Commit Graph

1416 Commits

Author SHA1 Message Date
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
Nicolas De Loof 55c5c8e8ac
Report image we can't pull and must be built
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2019-11-25 15:18:27 +01:00
Ulysses Souza a83d86e7ce
Merge pull request #7037 from ndeloof/stdin
config_detail.filename is None when passed by stdin
2019-11-22 15:24:43 +01:00
Nicolas De Loof e6ec77047b Revert "only pull images that can't build"
This reverts commit c6dd7da15e.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2019-11-21 14:37:41 +01:00
Nicolas De Loof fe2b692547
testcase for compose file read from stdin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2019-11-20 15:38:15 +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
Nicolas De Loof 1ca10f90fb Fix acceptance tests
tty is now (correclty) reported to have 80 columns, which split service
ID in two lines

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2019-10-16 14:31:27 +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
Ulysses Souza 5add9192ac Rename envvar switch to COMPOSE_DOCKER_CLI_BUILD
From `COMPOSE_NATIVE_BUILDER` to `COMPOSE_DOCKER_CLI_BUILD`

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-08-30 12:11:09 +02:00
Ulysses Souza bbdb3cab88 Add integration tests to native builder
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-08-29 09:31:16 +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
Ulysses Souza b03889ac2a Add integration tests regarding environment
This covers what was included in #6800

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-31 02:09:41 +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
Ulysses Souza 1b326fce57
Merge pull request #6720 from ijc/pass-env-to-docker-cli
Pass environment when calling through to docker cli.
2019-07-12 10:11:47 +02:00
Ulysses Souza cacc9752a3 Pin busybox image version in tests
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-02 13:42:41 +02:00
Inconnu08 57055e0e66 Replace sets with set literal syntax for efficiency
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-06-02 20:21:21 +06: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
Inconnu08 b29b6a1538 replace sets with set literal syntax for efficiency
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-05-31 20:29:09 +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
Ian Campbell a89128118b
Merge pull request #6342 from collin5/b5547
--remove-orphans is ignored when using up --no-start
2019-05-20 15:45:24 +01:00
Ulysses Souza 9de6ec3700
Merge pull request #6695 from Inconnu08/fix_depreciation
fixes warn method is deprecated
2019-05-20 12:34:51 +02: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
Ulysses Souza 8a9575bd0d Remove remaining containers on test_build_run
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-05-14 19:13:21 +02:00
Ulysses Souza f2dc923084 Avoid race condition on test
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-04-19 15:53:02 +02:00
Ulysses Souza e047169315 Workaround race conditions on tests
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-04-17 17:59:12 +02:00
Ian Campbell e84ffb6aeb
Merge pull request #6592 from treatwell/6589-depends_on-recreation-fix
Fixed depends_on recreation behaviour for issue #6589
2019-03-26 14:06:14 +00:00
joeweoj 8a339946fa
Fixed depends_on recreation behaviour for issue #6589
Previously any containers which did *not* have any links were always recreated.
In order to fix depends_on and preserve expected links recreation behaviour, we now only use the ConvergenceStrategy.always recreation strategy for a service if any of the the following conditions are true:
* --always-recreate-deps flag provided
* service container is stopped
* service defines links but the container does not have any
* container has links but the service definition does not

Signed-off-by: joeweoj <joewardell@gmail.com>
2019-03-26 11:48:20 +00:00
Ian Campbell 6ccbb56fec
Merge pull request #6494 from collin5/b6464
Only pull images that can't build `docker-compose pull`
2019-03-25 13:25:32 +00:00
Collins Abitekaniza c6dd7da15e only pull images that can't build
Signed-off-by: Collins Abitekaniza <abtcolns@gmail.com>
2019-03-24 01:05:30 +03:00
Henke Adolfsson 853215acf6
Remove project.stop() in test
Signed-off-by: Henke Adolfsson <catears13@gmail.com>
2019-03-08 07:43:53 +01: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
Henke Adolfsson aa79fb2473
Ensure test passes
Signed-off-by: Henke Adolfsson <catears13@gmail.com>
2019-03-08 07:43:53 +01:00
Henke Adolfsson 76d0406fab
Add test and implementation for secret added after container has been created
The issue is that if a secret is added to the compose file, then it will
not notice that containers have diverged since last run, because secrets
are not part of the config_hash, which determines if the configuration of
a service is the same or not.

Signed-off-by: Henke Adolfsson <catears13@gmail.com>
2019-03-08 07:43:53 +01:00
Ian Campbell 7bf9963cd6
Merge pull request #6547 from kudos/bugfix/scale-zero-default
Fix scale attribute to accept 0 as a value
2019-03-07 15:40:14 +00:00