moby / moby/swarmkit

mode option in tmpfs volume is ignored

Open
#3,226 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

The mode option of tmpfs volumes is ignored in swarm mode.

compose.yaml:

    volumes:
      - type: tmpfs
        target: /run
        tmpfs:
          size: 268435456
          mode: 1777

But in the resulting container the mode is not applied:

root@feb5df8c8de1:/# ls -ld /run/
drwxr-xr-x 4 root root 100 Nov 10 20:25 /run/
# dockerd -v
Docker version 28.5.2, build 89c5e8f

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the compose.yaml example in swarm mode and inspect the resulting /run permissions. Then trace tmpfs volume handling in the Go source to find where mode is lost; done means mode: 1777 is reflected in the resulting container.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.