When using the 'up' command, only services listed as arguments are
attached to, which can be very different to the 'no argument' case
if a service has many and deep dependencies:
- It's not clear when dependencies have failed to start. Have to run
'compose ps' separately to find out.
- It's not clear when dependencies are erroring. Have to run 'compose
logs' separately to find out.
With a simple setup, it's possible to work around theses issue by
using the 'up' command without arguments. But when there are lots of
'top-level' services, with common dependencies, in a single config,
using 'up' without arguments isn't practical due to resource limits
and the sheer volume of output from other services.
This introduces a new '--attach-dependencies' flag to optionally attach
dependent containers as part of the 'up' command. This makes their logs
visible in the output, alongside the listed services. It also means we
benefit from the '--abort-on-container-exit' behaviour when dependencies
fail to start, giving more visibility of the failure.
Signed-off-by: Ben Thorner <ben.thorner@digital.cabinet-office.gov.uk>
Deploying stacks using the "Docker Application Bundle" (`.dab`) file
format was introduced as an experimental feature in Docker 1.13 /
17.03, but superseded by support for Docker Compose files in the CLI.
With no development being done on this feature, and no active use of the file
format, support for the DAB file format and the top-level `docker deploy` command
(hidden by default in 19.03), will be removed from the CLI, in favour of
`docker stack deploy` using compose files.
This patch removes the `docker-compose bundle` subcommand from Docker Compose,
which was used to convert compose files into DAB files (and given the above,
will no longer be needed).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Avoid to attach to restarting containers and ignore
race conditions when trying to attach to already
dead containers
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
This fix makes sure that stdin_open specified in the service
is considering when shelling out to the CLI
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
This ensures that settings from any `.env` file (such as `DOCKER_HOST`) are
passed on to the cli.
Unit tests are adjusted for the new parameter and a new case is added to ensure
it is propagated as expected.
Fixes: 6661
Signed-off-by: Ian Campbell <ijc@docker.com>
If there is no image locally `docker-compose --resolve-image-digests`
will try and get the digest from the repository.
Fixes https://github.com/docker/compose/issues/5818
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>