Description
tmpfs mounts not full describe in portainer
and can't create mounts from portainer by tmpfs
Steps to reproduce the issue:
create container with tmpfs mounts
docker service create
--name testservice
--mount type=bind,source=/data/service/s0001/db,target=/var/lib/postgresql
--mount type=tmpfs,target=/tmp
--mount type=tmpfs,target=/var/tmp
--mount type=tmpfs,target=/var/run
--mount type=tmpfs,target=/run
--network nginx-network
--mode replicated
--replicas 1
docker-repo/testimage
go to service details, look at mounts - tmpfs mounts not fully visualisable
Technical details:
docker service create \
--name portainer \
--publish 9000:9000 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=bind,src=/data/portainer,dst=/data \
portainer/portainer \
-H unix:///var/run/docker.sock
@G07cha Have a look at the TaskTemplate.ContainerSpec.Mounts
field in the ServiceCreate operation: https://docs.docker.com/engine/api/v1.30/#operation/ServiceCreate
@deviantony, yeah, I've deleted my previous comment because I've also found that it's possible to do through ContainerCreate.HostConfig.Mounts
, so I'll be looking into that.
Not sure if totally relevant to this issue, but I needed a tmpfs mount to link within portainer and have used the example from the docker site:
docker volume create --driver local \
--opt type=tmpfs \
--opt device=tmpfs \
--opt o=size=100m,uid=1000 \
foo
It's then selectable just as any volume.
Most helpful comment
@deviantony, yeah, I've deleted my previous comment because I've also found that it's possible to do through
ContainerCreate.HostConfig.Mounts
, so I'll be looking into that.