Mode option in tmpfs volume is ignored when deployed via docker stack deploy
Los mantenedores suelen responder en 1 día
@locker95 ya está trabajando en esto.
Desde el 2/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
Línea de trabajo
Empieza por el convertidor de Compose de Docker CLI, que el comentario de SwarmKit enlazado identifica como el origen de la opción que se descarta, y averigua cómo copia tmpfs.size en el montaje del servicio. Lee las pruebas de conversión cercanas y comprueba si cubren tmpfs.mode. Se considera terminado cuando docker stack deploy conserva el modo configurado y hay una prueba que cubre esa conversión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
The mode option of tmpfs volumes is ignored in swarm mode, when deployed via docker stack deploy.
compose.yaml:
services:
alpine:
image: alpine:3.20
command: ["sh", "-c", "while true; do sleep 3600; done"]
volumes:
- type: tmpfs
target: /run
tmpfs:
size: 268435456
mode: 01777
In the resulting container the mode is not applied:
/ # ls -ld /run
drwxr-xr-x 2 root root 40 Nov 2 20:57 /run
# docker -v
Docker version 29.9.2, build a82e528
@dperny commented on the issue I initially filed on the moby/swarmkit project:
Thanks for the report. Assuming this was deployed with docker stack deploy, this is a real bug, but it is in the Docker CLI rather than swarmkit: the CLI's compose converter copies only tmpfs.size into the service mount and drops tmpfs.mode, while swarmkit and the Engine pass the mode through. I couldn't find a docker/cli issue for it, so please open one at https://github.com/docker/cli/issues, where the fix belongs. As a workaround, docker service create --mount type=tmpfs,destination=/run,tmpfs-mode=1777 does set the mode (https://docs.docker.com/reference/cli/docker/service/create/#options-for-tmpfs). Closing here, since no swarmkit change can fix it.
Reproduce
docker stack deploythe above compose file- enter the container and check the volume's mode
Expected behavior
Mode is set to rwx for all
docker version
Client: Docker Engine - Community
Version: 29.9.2
API version: 1.56
Go version: go1.26.10
Git commit: a82e528
Built: Tue Oct 20 18:45:13 2026
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 29.9.2
API version: 1.56 (minimum version 1.40)
Go version: go1.26.10
Git commit: 0367cbe
Built: Tue Oct 20 18:45:13 2026
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v2.4.2
GitCommit: b7a25261e029d68978bbf290df0a62fc819b3c51
runc:
Version: 1.5.2
GitCommit: v1.5.2-0-g29dd3dc2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client: Docker Engine - Community
Version: 29.9.2
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.38.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.7.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 7
Running: 7
Paused: 0
Stopped: 0
Images: 37
Server Version: 29.9.2
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: active
NodeID: anonymizednodeid000000000
Is Manager: false
Node Address: <REDACTED>
Manager Addresses:
<REDACTED>:2377
<REDACTED>:2377
<REDACTED>:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: b7a25261e029d68978bbf290df0a62fc819b3c51
runc version: v1.5.2-0-g29dd3dc2
init version: de40ad0
Security Options:
apparmor
Profile: default
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.12.115+deb13.1-amd64
Operating System: Debian GNU/Linux 13 (trixie)
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 125.7GiB
Name: node02
ID: 00000000-0000-0000-0000-000000000000
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: true
Insecure Registries:
127.0.0.0/8
::1/128
Live Restore Enabled: false
Firewall Backend: iptables
EnableUserlandProxy: true
UserlandProxyPath: /usr/bin/docker-proxy
Additional Info
No response
- Lenguaje dominante
- Go
- Estrellas
- 6.1k
- Forks
- 2.2k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 62
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de docker/cli
-
docker stack: text after an unbraced `$VAR` is dropped when it starts with `-`, `:-`, `?` or `:?`Posiblemente ocupada @sebxt la tomó hace 28 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
filename completion on `docker load -i`Posiblemente ocupada @cra la tomó hace 31 días. Abiertokind/feature status/0-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
docker build treats uppercase HTTP(S) URLs as local pathsPosiblemente ocupada @TanvirTian la tomó hace 38 días. Abiertokind/bug status/0-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
`docker context export` writes a truncated tar archivePosiblemente ocupada @2arian3 la tomó hace 54 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
Truncating log lines at 75 characters makes them useless.Posiblemente ocupada @locker95 la tomó hace 98 días. Abiertokind/bug status/0-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
docker/cli#7176 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de docker/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
fluxcd/notification-controller#1441 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OneBusAway/maglev#2145 ·
Los mantenedores suelen responder en 2 días
-
priority/medium status/ready type/chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
discobox-ai/discobox#1357 ·
Los mantenedores suelen responder en 1 día
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itPosiblemente ocupada @fzn0x la tomó hoy. Abiertobug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
edit_file diff rendering panics on invalid UTF-8 textPosiblemente ocupada @TDnorthgarden la tomó hoy. Abiertoarea/tui
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
docker/docker-agent#4955 ·
Los mantenedores suelen responder en 1 día