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
{{ message }}
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
When stopping a specific service, all services that the specified service depends on also stops. This is different from how docker-compose stop <service> functions.
Steps to reproduce the issue:
Create the three files pasted below in an empty folder
docker compose up -d to start all services
docker compose stop sub to stop the desired service
Describe the results you received:
Both sub and base was stopped.
Describe the results you expected:
Only sub was stopped. This is what docker-compose stop sub does.
Local output after starting and stopping services
$ docker compose up -d
[+] Running 3/3
⠿ Container stop-stops-all_base_1 Started
⠿ Container stop-stops-all_extra_1 Started
⠿ Container stop-stops-all_sub_1 Started
$ docker compose ps
NAME SERVICE STATUS PORTS
stop-stops-all_base_1 base running
stop-stops-all_extra_1 extra running
stop-stops-all_sub_1 sub running
$ docker compose stop sub
[+] Running 2/2
⠿ Container stop-stops-all_sub_1 Stopped
⠿ Container stop-stops-all_base_1 Stopped
$ docker compose ps
NAME SERVICE STATUS PORTS
stop-stops-all_extra_1 extra running
$ docker compose up -d
[+] Running 3/3
⠿ Container stop-stops-all_extra_1 Running
⠿ Container stop-stops-all_base_1 Started
⠿ Container stop-stops-all_sub_1 Started
$ docker-compose stop sub
Stopping stop-stops-all_sub_1 ... done
$ docker compose ps
NAME SERVICE STATUS PORTS
stop-stops-all_base_1 base running
stop-stops-all_extra_1 extra running
Output of docker version:
Client: Docker Engine - Community
Cloud integration: 1.0.12
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:13:00 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:15:47 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Description
When stopping a specific service, all services that the specified service depends on also stops. This is different from how
docker-compose stop <service>
functions.Steps to reproduce the issue:
docker compose up -d
to start all servicesdocker compose stop sub
to stop the desired serviceDescribe the results you received:
Both
sub
andbase
was stopped.Describe the results you expected:
Only
sub
was stopped. This is whatdocker-compose stop sub
does.Local output after starting and stopping services
Output of
docker version
:Output of
docker context show
:Output of
docker info
:Files used in test
docker-compose.yml
Dockerfile
server.js
The text was updated successfully, but these errors were encountered: