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>
* Add shm_size to build configuration
* Make it possible to enlarge/customize shm size during build
* Value in bytes, or use string like "512M" or "1G" ...
* Add to compose format 2.3 and (provisionally) >=3.5 format
* Add automated test for shm_size in build-opts
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Made unit tests compatible with previously added shm_size build-option
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Also support shm_size build-opt when conf override
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Automated test for shm_size build-option
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Schema 3.4, add shm_size to schema 2.3, updated const.py
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Corrected typo in config_schema_v3.4
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Add support for g/m/k units for shm_size in build-opts
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Reorder imports in service.py
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
- Event may contain more information in some cases.
Don't assume order or format
- Don't assume ports are always exposed on 0.0.0.0 by default
- Absence of HostConfig in a create payload sometimes causes an error at the
engine level
- In Swarm, volume names are prefixed by "<node_name>/"
- When testing against Swarm, the default network driver is overlay
- Ensure custom test networks are always attachable
- Handle Swarm network names
- Some params moved to host config in recent (1.21+) version
- Conditional test skips for Swarm environments
Signed-off-by: Joffrey F <joffrey@docker.com>