Commit Graph

842 Commits

Author SHA1 Message Date
Ulysses Souza 409a9d8207
Merge pull request #7150 from ulyssessouza/add-python-dotenv
Add python-dotenv to delegate `.env` file processing
2020-01-27 14:48:41 +01:00
Ulysses Souza 6d2658ea65 Add python-dotenv
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-27 13:50:34 +01:00
Ben Thorner a6b602d086 Support attaching to dependencies on up
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>
2020-01-16 13:41:54 +00:00
Ulysses Souza 2cb1b4bd5b
Merge pull request #6873 from frenzymadness/pytest_compatibility
Bump Pytest and add refactor compatibility with new version
2020-01-10 17:09:33 +01:00
Lumir Balhar a436fb953c Remove indentation from test YAML
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
2020-01-10 08:41:11 +01:00
Sergey Fursov c818bfc62c support PyYAML up to 5.x version
Signed-off-by: Sergey Fursov <geyser85@gmail.com>
2020-01-09 12:30:51 +01:00
Lumir Balhar 73cc89c15f Use stdlib modules instead of deprecated pytest fixtures
Signed-off-by: Lumír Balhar <lbalhar@redhat.com>
2020-01-09 07:01:44 +01:00
Sebastiaan van Stijn 33eeef41ab Remove "bundle" subcommand and support for DAB files
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>
2020-01-08 16:42:49 +01:00
Ulysses Souza 702dd9406c
Merge pull request #7093 from ulyssessouza/warn-invalid-version
Validate version format on formats 2+
2020-01-08 10:47:01 +01:00
ulyssessouza 7f49bbb998 Validate version format on formats 2+
Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
2020-01-07 18:37:47 +01:00
Ulysses Souza 37eb7a509b Decode APIError explanation to unicode before usage
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-06 16:00:34 +01:00
Ulysses Souza cba8ad474c Fix by adding an assert to make the comparison effective
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-06 15:53:32 +01:00
Djordje Lukic f8142a899c Cleanup all open files
If the fd is not closed the cleanup will fail on windows.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-10-28 15:36:05 +01:00
Guillaume Lours 386bdda246 Format image size as decimal to be align with Docker CLI
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2019-10-18 12:50:38 +02:00
Aleksandr Mezin 74f892de95 Add test to verify same file 'extends' optimization
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
2019-10-09 11:36:17 +06:00
ulyssessouza eca358e2f0 Fix secret missing warning
Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
2019-09-27 09:10:49 +02:00
Ulysses Souza 70ead597d2 Add tests to 'get_secret' warnings
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-09-09 10:04:05 +02:00
Silvin Lubecki 1566930a70
Merge pull request #6862 from deathtracktor/master
Fix KeyError when remote network labels are None.
2019-09-06 11:13:48 +02:00
Danil Kister a5fbf91b72 Prevent KeyError when remote network labels are None.
Signed-off-by: Danil Kister <danil.kister@gmail.com>
2019-09-05 21:36:10 +02:00
Ulysses Souza 47d170b06a Fix race condition on watch_events
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>
2019-09-04 17:55:05 +02:00
aiordache 60dcf87cc0 update alpine version to 3.10.1
Signed-off-by: aiordache <anca.iordache@docker.com>
2019-08-20 12:10:26 +02:00
Silvin Lubecki cd8e2f870f
Merge pull request #6813 from ulyssessouza/fix_stdin_open
Fix stdin_open when running docker-compose run
2019-07-24 11:20:20 +02:00
Ulysses Souza c641ea08ae Fix stdin_open when running docker-compose run
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>
2019-07-22 17:27:10 +02:00
Ulysses Souza cd098e0cad Pin test images on a non rolling tag
Mainly busybox:latest to the current latest which is 1.31.0-uclibc

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-18 11:10:37 +02:00
Djordje Lukic c8279bc4db
Merge pull request #6738 from Inconnu08/set-optimization
Replace sets with set literal syntax for efficiency
2019-07-15 15:23:24 +02:00
Djordje Lukic 98932e9cb4
Merge pull request #6754 from Goryudyuma/6740-fix-display
fix: The correct number is displayed
2019-07-15 10:30:59 +02:00
Goryudyuma 59491c7d77
add: test for units
Signed-off-by: Kei Matsumoto <umaretekyoumade@gmail.com>
2019-07-14 04:31:16 +09:00
Kei Matsumoto 75d41edb94
fix: Add test
Signed-off-by: Kei Matsumoto <umaretekyoumade@gmail.com>
2019-07-14 03:38:29 +09:00
Inconnu08 c37fb783fe replace sets with set literal syntax for efficiency
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-06-01 01:31:35 +06:00
Ian Campbell 9d2508cf58 Pass environment when calling through to docker cli.
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>
2019-05-23 16:29:46 +01:00
Inconnu08 99e67d0c06 fix warning method is deprecated with tests
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-05-15 23:46:12 +06:00
Henke Adolfsson 87935893fc
Update data for unit tests
Signed-off-by: Henke Adolfsson <catears13@gmail.com>
2019-03-08 07:43:53 +01:00
Michael Irwin d8e390eb9f Added test case to verify fix for #6525
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2019-03-07 15:30:11 +01:00
Peter Nagy (NPE) e34d329227 adds --no-interpolate to docker-compose config
Signed-off-by: Peter Nagy <pnagy@gratex.com>
2019-03-04 13:03:35 +01:00
slowr b09d8802ed Added additional argument (--env-file) for docker-compose to import environment variables from a given PATH.
Signed-off-by: Dimitrios Mavrommatis <jim.mavrommatis@gmail.com>
2019-02-26 16:38:54 +01:00
tuttieee 572032fc0b Fix Project#build_container_operation_with_timeout_func not to mutate a 'option' dict over multiple containers
Signed-off-by: Yuichiro Tsuchiya <t.yic.yt@gmail.com>
2019-02-25 13:07:41 +01:00
Ulysses Souza c8a621b637 Fix Flake8 lint
This removes extra indentation and replace the use of `is` by `==` when
comparing strings

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-02-05 11:11:52 +01:00
Chris Crone 8f5f7e72be
Merge pull request #6466 from rumpl/credential-spec
Support for credential_spec
2019-01-21 11:03:34 +01:00
Djordje Lukic ae0f3c74a0 Support for credential_spec
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2019-01-17 16:00:22 +01:00
Djordje Lukic 0c20fc5d91 Resolve digests without pulling image
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>
2019-01-15 14:24:26 +01:00
Stephan Müller 56fbd22825
fix race condition after pulling image
Signed-off-by: Stephan Müller <mail@stephanmueller.eu>
2019-01-09 23:14:12 +01:00
Joffrey F 4bd93b95a9
Merge pull request #6406 from collin5/b5948
Error on duplicate mount points.
2019-01-02 10:11:50 -08:00
Collins Abitekaniza 47ff8d710c test create from config with duplicate mount points
Signed-off-by: Collins Abitekaniza <abtcolns@gmail.com>
2019-01-02 17:51:22 +03:00
Andriy Maletsky 01eb4b6250 Lower severity to "warning" if `down` tries to remove nonexisting image
Signed-off-by: Andriy Maletsky <andriy.maletsky@gmail.com>
2018-12-28 13:21:23 -08:00
Joffrey F b7374b6271
Merge pull request #6390 from ulyssessouza/6369-override-networks-settings
Fix merge on networks section
2018-12-28 07:25:57 +09:00
Joffrey F 6b3855335e
Merge pull request #6410 from docker/2618-new-events-api
Use improved API fields for project events when possible
2018-12-28 07:22:24 +09:00
Joffrey F 5232100331 Merge branch 'feature/reject_environment_variable_that_contains_white_spaces' of https://github.com/hirochachacha/compose into hirochachacha-feature/reject_environment_variable_that_contains_white_spaces 2018-12-14 13:42:05 -08:00
Joffrey F 8b293d486e Use improved API fields for project events when possible
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-12-13 14:13:20 -08:00
Ulysses Souza a2bcf52665 Fix merge on networks section
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2018-12-11 10:36:49 +01:00
Hiroshi Ioka afc161a0b1 reject environment variable that contains white spaces
Signed-off-by: Hiroshi Ioka <hirochachacha@gmail.com>
2018-12-11 12:52:29 +09:00