0

So imagine this command:

docker compose -f docker/docker-compose.yml run \ --rm --entrypoint "" \ my-service 

and something like this for docker/docker-compose.yml:

version: '3.9' services: my-service: depends_on: other-service ... other-service: ... 

When I run the command both services come up. But it seems, that both have their entrypoint overridden with "". Is that possible? And if so, how can i archive that only my-services entrypoint gets overridden?

The docs only state:

--entrypoint Override the entrypoint of the image 

1 Answer 1

0

docker compose run only starts a single service from the docker-compose.yml file.

docker compose run my-service starts the service my-service. So the --entrypoint argument only affects the specified service.

2
  • It starts the seconds service as well because of the depends_on entry. Commented Aug 29, 2023 at 9:04
  • docker compose run should start all services defined in docker-compose.yaml. Your statement in the post is a bit misleading. Commented Feb 22, 2024 at 8:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.