-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Description
docker-compose v2.3.3 appears not to fully implement the dependency-starting behaviour of links.
services:
foo:
links:
- bar
will create bar but not start it.
services:
foo:
depends_on:
- bar
links:
- bar
will ensure bar gets started, but should be superfluous--linksis explicitly documented to implydepends_on`.
Steps to reproduce the issue:
See snippets above -- create a docker-compose.yml that uses links and not depends_on.
Describe the results you received:
Linked services that should be started are merely created.
Describe the results you expected:
Linked services are created and started, as prerequisites of the linking service, as if they had been called out in depends_on.
Additional information you deem important (e.g. issue happens only occasionally):
This behaviour was witnessed both on Arch Linux with docker-compose 2.3.3, and on macOS Docker Desktop 4.6.0
Output of docker compose version:
Docker Compose version 2.3.3
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.0-docker)
compose: Docker Compose (Docker Inc., 2.3.3)
Server:
Containers: 15
Running: 5
Paused: 0
Stopped: 10
Images: 61
Server Version: 20.10.13
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
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 logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 10f428dac7cec44c864e1b830a4623af27a9fc70.m
runc version: v1.1.0-0-g067aaf85
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.16.15-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 14
Total Memory: 27.41GiB
Name: archie
ID: OKFG:RAZ6:H4RV:HRZU:RPEH:PMMT:3FA6:TSWT:BWX5:7PQA:W6T7:Y3PL
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: betterupbot
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false