You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meldafrawi
changed the title
[BUG] Configs uid, gid and mode is will not take effect with configs with type file
[BUG] Configs uid, gid and mode is will not take effect with configs of type file
Nov 5, 2024
This is a known limitation, as we use bind mounts to add config file inside container, and bind mount doesn't allow to override uid/gid/mode as seen by container
See #12251 for discussion to add support for this using an alternative approach
would make sense, feel free to propose some additional notes on https://github.com/docker/docs
But this page is a copy from github.com/compose-spec and as such not specific to Docker Compose, so hardly can have a dedicated section on limitations we have in this area. Anyway, Docker Compose will warn you about unsupported attribute when you run compose up command
Description
Trying to set uid, gid, and mode for a config resource of type
file
is not workingSteps To Reproduce
docker compose file:
Check
test.json
file ownership & permissions:docker compose exec -it test ls -la /test.json
Compose Version
Docker Compose version v2.29.7
Docker Environment
Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.7
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: xxx
Running: xxx
Paused: xxx
Stopped: xxx
Images: xxx
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
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
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-48-generic
Operating System: Ubuntu 22.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: xxx
Total Memory: xxx GiB
Name: nil
ID: 72f5f66c-04c5-4a36-8416-35d7066b9f0e
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Anything else?
No response
The text was updated successfully, but these errors were encountered: