Starting with Docker 20.10, the docker daemon has support for
"dual logging", which allows reading back logs, irregardless of
the logging-driver that is configured (except for "none" as logging
driver).
This patch removes the local check, which used a hard-coded list of
logging drivers that are expected to support reading logs.
When using an older version of Docker, the API should return an
error that reading logs is not supported, so no local check should
be needed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
For command completion of `docker-compose --profile`, we need a portable
way to get a list of profiles used in the current config.
This commit adds a new option `docker-compose config --profiles`.
Signed-off-by: Harald Albers <github@albersweb.de>
This allows us to revert from Debian Buster to Stretch which allows
us to relax the glibc version requirements.
Signed-off-by: Chris Crone <christopher.crone@docker.com>
* Move global console_handler into function scope
Signed-off-by: Mike Seplowitz <mseplowitz@bloomberg.net>
* Improve control over ANSI output
- Disabled parallel logger ANSI output if not attached to a tty.
The console handler and progress stream already checked whether the
output stream is a tty, but ParallelStreamWriter did not.
- Added --ansi=(never|always|auto) option to allow clearer control over
ANSI output. Since --no-ansi is the same as --ansi=never, --no-ansi is
now deprecated.
Signed-off-by: Mike Seplowitz <mseplowitz@bloomberg.net>
When 'up' is run with explicit list of services, compose will
start them together with their dependencies. It will attach to all
started services, but won't read output from dependencies (their
logs are not printed by 'up') - so the receive buffer of
dependencies will fill and at some point will start blocking those
services. Fix that by only attaching to services given in the
list.
To do that, move logic of choosing which services to attach from
cli/main.py to utils.py and use it from project.py to decide if
service should be attached.
Fixes#6018
Signed-off-by: Daniil Sigalov <asterite@seclab.cs.msu.ru>
This changes compose to use "native" build through the CLI
by default. With this, docker-compose can take advantage of
BuildKit (which is now enabled by default on Docker Desktop
2.5 and up).
Users that want to use the python client for building can
opt-out of this feature by setting COMPOSE_DOCKER_CLI_BUILD=0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The order of precedence is:
- '--project-directory' option
- first file directory in '--file' option
- current directory
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
* Setup environment variables for compose.
- Setup environment variables to work as expected for compose
config and context in container mode.
- Setup volume mounts based on -f, --file argument for compose
config and context.
Signed-off-by: Ericson Macedo <macedoericson@gmail.com>
* Improve parsing of specified compose file
- Update parsing of multiple -f, --file parameters.
- Remove usage of eval command.
Signed-off-by: Ericson Macedo <macedoericson@gmail.com>