Score:0

Which entrypoint does the --entrypoint cli option in the docker compose command override?

ca flag

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
Score:0
in flag

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.

Paflow avatar
ca flag
It starts the seconds service as well because of the depends_on entry.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.