-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
Description
When using configs in compose, a file with mode: 0555 can be made executable.
This works until v2.33.1 and gives an error in v2.34.0:
services.<name>.configs.0.mode must be a number
Use case:
Script to wait for a Swarm service to be up (and a port to respond) before launching a process
Steps To Reproduce
Reproduced on debian.11 bullseye + ubuntu.24.04 noble
Docker CLI: 28.0.4
Docker Engine: 28.0.4
Docker compose plugin: 2.34.0 (same with docker-compose standalone v2.34.0)
Example:
configs:
await_tcp_script:
file: ./await/await-tcp.sh
services:
# serviceA should respond on port 9000 before the `nginx` process starts
serviceA:
...
nginx:
...
configs:
- source: await_tcp_script
target: /await-tcp.sh
mode: 0555
command:
/await-tcp.sh 30 serviceA:9000 -- nginx
...
Run it as a docker stack :
docker stack deploy ...
Will fail with the error:
services.nginx.configs.0.mode must be a number
Workaround
Downgrading compose to v2.33.1 works:
# Debian
apt install docker-compose-plugin=2.33.1-1~debian.11~bullseye
# Ubuntu
apt install docker-compose-plugin=2.33.1-1~ubuntu.24.04~noble
Compose Version
$ docker compose version
Docker Compose version v2.34.0
Docker Environment
$ docker info
Client: Docker Engine - Community
Version: 28.0.4
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.22.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.34.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 48
Running: 17
Paused: 0
Stopped: 31
Images: 592
Server Version: 28.0.4
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: local
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: active
NodeID: <id>
Is Manager: true
ClusterID: <id>
Managers: 1
Nodes: 1
Default Address Pool: 10.136.0.0/16
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: <ip>
Manager Addresses:
<ip>:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc version: v1.2.4-0-g6c52b3f
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-53-generic
Operating System: Ubuntu 24.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.62GiB
Name: <name>
ID: <id>
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Default Address Pools:
Base: 10.134.0.0/16, Size: 24
Anything else?
Could be something I missed in the changelog or a side effect of something else..
Thanks for your work here