-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
compose-spec/compose-go
#525Closed
Copy link
Labels
Description
Description
Hello,
On version 2.24.0 of docker compose, I get the following bind error when trying to run docker compose up, if the source directory does not already exist:
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/logs
I expect that if the source directory does not exist, it should be automatically created. If I revert back to version 2.23.3, the error does not occur and the directory is created automatically as expected.
I didn't see anything in the change logs that indicated an expected change to this behaviour. Apologies if I overlooked something.
Cheers,
Pat
Steps To Reproduce
- Create a compose file located at
/tmp/test.ymlwith the following content:
services:
test:
image: alpine
volumes:
- ./logs/:/tmp/logs/
command: ls /tmp/logs/
- Run
docker compose --file /tmp/test.yml up - You should see the error
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/logs - Create the folder
/tmp/logs/ - Run
docker compose --file /tmp/test.yml up. - The container should launch as expected.
Compose Version
Docker Compose version v2.24.0
Docker Environment
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.11.2)
compose: Docker Compose (Docker Inc., v2.24.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.25
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 0cae528dd6cb557f7201036e9f43420650207b58
runc version: f19387a6bec4944c770f7668ab51c4348d9c2f38
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.334-252.552.amzn2.x86_64
Operating System: Amazon Linux 2
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.4GiB
Name: ip-172-20-90-60.ap-southeast-2.compute.internal
ID: ZHVR:BPLX:AZJW:A7YR:4F3Q:O77D:KZJ6:ZMFS:T4WU:6AXS:45ZS:QGMM
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response