-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker compose ps
does not show services from docker-compose.override.yml
#418
Comments
Hi @roslov, thanks for submitting this issue! We're looking into this to see if a regression may have occurred in 4.12. I'll update when I have more insight. |
Any updates on this? |
Hello @roslov |
Thank you. The
|
I also have this issue. I've tried setting
I added this as a zsh alias until the bug is fixed. Hope it helps: dc() {
if [ -n "${COMPOSE_PROJECT_NAME}" ]; then
docker compose -p $COMPOSE_PROJECT_NAME $@
else
docker compose $@
fi
} |
I've not been able to reproduce with a simple override file, but found a scenario where I was able to: need to have profiles in my compose file (override is not involved) and run the app with such profiles enabled. Then proposed a fix: docker/compose#10145 |
@ndeloof, you’re right. It is related to the profiles. Here is the setup to reproduce: #docker-compose.yml
version: "3.4"
services:
nginx:
image: nginx:latest
restart: always
nginx3:
profiles:
- full
image: nginx:latest
restart: always #docker-compose.override.yml
version: "3.4"
services:
nginx2:
profiles:
- full
image: nginx:latest
restart: always $ docker compose --profile=full up -d
Network temp_default Creating
Network temp_default Created
Container temp-nginx3-1 Creating
Container temp-nginx-1 Creating
Container temp-nginx2-1 Creating
Container temp-nginx3-1 Created
Container temp-nginx2-1 Created
Container temp-nginx-1 Created
Container temp-nginx2-1 Starting
Container temp-nginx3-1 Starting
Container temp-nginx-1 Starting
Container temp-nginx2-1 Started
Container temp-nginx3-1 Started
Container temp-nginx-1 Started
$ docker compose ps
NAME COMMAND SERVICE STATUS PORTS
temp-nginx-1 "/docker-entrypoint.…" nginx running 80/tcp
$ docker compose -p temp ps
NAME COMMAND SERVICE STATUS PORTS
temp-nginx-1 "/docker-entrypoint.…" nginx running 80/tcp
temp-nginx2-1 "/docker-entrypoint.…" nginx2 running 80/tcp
temp-nginx3-1 "/docker-entrypoint.…" nginx3 running 80/tcp
$ docker compose --profile=full ps
NAME COMMAND SERVICE STATUS PORTS
temp-nginx-1 "/docker-entrypoint.…" nginx running 80/tcp
temp-nginx2-1 "/docker-entrypoint.…" nginx2 running 80/tcp
temp-nginx3-1 "/docker-entrypoint.…" nginx3 running 80/tcp Shouldn’t |
@roslov |
docker/compose#10145 being merged, this can be closed |
I confirm that the bug is fixed. Docker Desktop v4.16.1 works correctly. |
Still found another problem. The setup above is not downed by $ docker compose down
Container temp-nginx-1 Stopping
Container temp-nginx-1 Stopping
Container temp-nginx-1 Stopped
Container temp-nginx-1 Removing
Container temp-nginx-1 Removed
Network temp_default Removing
Network temp_default Error
failed to remove network temp_default: Error response from daemon: error while removing network: network temp_default id fa36d97bfc845e349236a47e003d9c8ade3ecac8d0e4c4bf39f952ed180b969a has active endpoints
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a37c882190a8 nginx:latest "/docker-entrypoint.…" About a minute ago Up About a minute 80/tcp temp-nginx3-1
72f0cd34fac6 nginx:latest "/docker-entrypoint.…" About a minute ago Up About a minute 80/tcp temp-nginx2-1 |
@roslov this is the expected behavior: when ran with a compose file, |
Closing this for now since the bug has been resolved as of docker/compose#10145 being merged into Docker Desktop v4.16.1. |
Tell us about your request
Since Docker Desktop 4.12.0, the
docker compose ps
command does not show the services fromdocker-compose.override.yml
.Which service(s) is this request for?
Docker Desktop 4.12.0 (85629)
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
I use both
docker-compose.yml
anddocker-compose.override.yml
.When I start my project with
docker compose up -d
, all containers are running.But when I run
docker compose ps
, I see only services located indocker-compose.yml
, but no services fromdocker-compose.override.yml
.docker ps
show all services.This happens on Docker Desktop 4.12.0 (85629).
The previous problem did not have such a problem.
Are you currently working around the issue?
I use
docker ps
to see all containers. But it’s not so comfortable comparing todocker compose ps
.Additional context
—
The text was updated successfully, but these errors were encountered: