1494 Commits
Author SHA1 Message Date
Anca Iordache 1b42ecba14 Update flaky tests on inter-service dependencies
Signed-off-by: Anca Iordache <[email protected]>
2021-04-15 10:44:32 +02:00
Anca Iordache 3ba41b98d3 Add Ipc mode to the config hash
Signed-off-by: Anca Iordache <[email protected]>
2021-04-13 16:47:42 +02:00
Anca Iordache 683fac0dbf Merge pull request #8122 from ojab/add_init_containers
Add init container support
2021-04-06 18:25:24 +01:00
Chris Crone 84afa518e8 Merge pull request #8061 from albers/completion-profiles
Add bash completion for profiles and a command to list profiles
2021-03-30 09:33:50 +02:00
Anca Iordache f5342b600c Add compose.yaml/.yml to default filenames
Signed-off-by: Anca Iordache <[email protected]>
2021-03-16 18:04:51 +01:00
Anca Iordache 4a26d95de4 Make --env-file paths relative to current working directory
Look up compose files in project dir as fallback to no compose file in current working directory
Update config and env-file tests
 - get_default_config does not raise error anymore, returns None if no compose file is found

Signed-off-by: Anca Iordache <[email protected]>
2021-03-16 18:04:51 +01:00
Slava Kardakov 4daad056c4 Add init container support
Fixes #6855

See https://github.com/compose-spec/compose-spec/pull/134

Signed-off-by: Slava Kardakov <[email protected]>
2021-02-18 17:47:59 +00:00
Sebastiaan van Stijn 28f8b8549d Remove local check for log-driver read support
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 <[email protected]>
2021-01-28 16:55:36 +01:00
Harald Albers 862107a32a Add option for listing service profiles
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 <[email protected]>
2021-01-22 19:24:15 +00:00
Mike Seplowitz 4fa72a066a Improve control over ANSI output (#6858)
* Move global console_handler into function scope

Signed-off-by: Mike Seplowitz <[email protected]>

* 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 <[email protected]>
2021-01-19 18:17:55 +01:00
Anca Iordache b9249168bd Merge pull request #7926 from maaarghk/no_build_cache_from_duplicate_check
Remove duplicate values check for build.cache_from
2021-01-11 18:33:16 +01:00
Anca Iordache e36ac32120 Merge pull request #7978 from thaJeztah/default_to_cli_build
Make COMPOSE_DOCKER_CLI_BUILD=1 the default
2021-01-11 18:29:42 +01:00
Ulysses Souza 369eb3220a Add metrics
Signed-off-by: Ulysses Souza <[email protected]>
2021-01-04 15:16:51 -03:00
Sebastiaan van Stijn affb0d504d Make COMPOSE_DOCKER_CLI_BUILD=1 the default
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 <[email protected]>
2020-12-08 12:26:41 +01:00
Ulysses Souza e0edc908b5 Fix project_dir to take first file in account
The order of precedence is:
- '--project-directory' option
- first file directory in '--file' option
- current directory

Signed-off-by: Ulysses Souza <[email protected]>
2020-12-02 16:59:47 -03:00
Anca Iordache f1059d75ed Merge pull request #7866 from luca-nardelli/improve-mandatory-variables-issues
Report which variable fails interpolation when they are mandatory
2020-12-02 20:06:25 +01:00
Roman Anasal 2d2a8a0469 Implement service profiles
Implement profiles as introduced in compose-spec/compose-spec#110
fixes #7919
closes #1896
closes #6742
closes #7539

Signed-off-by: Roman Anasal <[email protected]>
2020-12-02 01:08:11 +01:00
Mark Gallagher 3ebfa4b089 Remove duplicate values check for build.cache_from
The `docker` command accepts duplicate values, so there is no benefit to
performing this check.

Fixes #7342.

Signed-off-by: Mark Gallagher <[email protected]>
2020-11-13 01:56:37 +00:00
Anca Iordache f965401569 Merge pull request #7435 from rohitkg98/7416-add-disable-log-prefix-flag
Added option to disable log prefix via cli
2020-11-12 09:34:20 +01:00
Ulysses Souza 675c9674e1 Add Makefile including spec download target
Signed-off-by: Ulysses Souza <[email protected]>
2020-10-27 13:50:17 +01:00
Kaushal Rohit cddaa77fea Added option to disable log prefix via cli
Signed-off-by: Kaushal Rohit <[email protected]>
2020-10-18 19:52:16 +05:30
Luca Nardelli d51249acf4 Report which variable fails interpolation when they are mandatory
Add default value before raising UnsetRequiredSubstitution

Signed-off-by: Luca Nardelli <[email protected]>
2020-10-15 09:55:04 +02:00
Ulysses Souza ce59a4c223 Fix port rendering
Signed-off-by: Ulysses Souza <[email protected]>
2020-09-24 14:49:26 +02:00
aiordache 5340a6d760 Add test for scale with stopped containers
Signed-off-by: aiordache <[email protected]>
2020-09-16 15:59:43 +02:00
aiordache a85d2bc64c update test for start trigger
Signed-off-by: aiordache <[email protected]>
2020-09-16 15:59:43 +02:00
aiordache fa720787d6 update depends_on tests
Signed-off-by: aiordache <[email protected]>
2020-09-14 18:01:35 +02:00
Kevin Clark d811500fa0 Added merge for max_replicas_per_node
Signed-off-by: Kevin Clark <[email protected]>
2020-09-11 08:01:24 -04:00
Ulysses Souza fde1c681a7 Preserve the version when specified in the file
Signed-off-by: Ulysses Souza <[email protected]>
2020-09-10 13:10:33 +02:00
Ulysses Souza 3b17b3c2c0 Fix stderr on returncode is different of 0
Signed-off-by: Ulysses Souza <[email protected]>
2020-08-31 22:20:26 +02:00
Erfan Gholamian 76963e44ad Added integration test for build error when building with docker cli
Signed-off-by: Erfan Gholamian <[email protected]>
2020-08-21 20:52:56 +02:00
Ulysses Souza dff3ce28f4 Fix flake8
Signed-off-by: Ulysses Souza <[email protected]>
2020-08-21 19:25:24 +02:00
Ulysses Souza c447ff8c2c Update API version for docker client
Signed-off-by: Ulysses Souza <[email protected]>
2020-08-21 18:11:27 +02:00
Ulysses Souza 5bbd670166 Update tests to use the version on docker client
Signed-off-by: Ulysses Souza <[email protected]>
2020-08-21 16:42:00 +02:00
Anca Iordache 25d773c924 Merge pull request #7676 from aiordache/fix_deploy_parsing
Update schema and fix scale parsing
2020-08-18 14:34:25 +02:00
aiordache 2b4d409ac3 Update schema and fix memory limit parsing
Signed-off-by: aiordache <[email protected]>
2020-08-17 20:08:06 +02:00
Ryosuke TOKUAMI 35f1334cbd Use docker cli on run when the envvar passed.
Make docker-compose run pass the the cli option
to project.up to build images using docker cli
considering COMPOSE_DOCKER_CLI_BUILD environment
variable.

Signed-off-by: Ryosuke TOKUAMI <[email protected]>
2020-08-12 15:42:37 +02:00
alexrecuenco 4d3d9f64b9 Removed Python2 support
Closes: #6890

Some remarks,

- `# coding ... utf-8` statements are not needed
- isdigit on strings instead of a try-catch.
- Default opening mode is read, so we can do `open()` without the `'r'` everywhere
- Removed inheritinng from `object` class, it isn't necessary in python3.
- `super(ClassName, self)` can now be replaced with `super()`
- Use of itertools and `chain` on a couple places dealing with sets.
- Used the operator module instead of lambdas when warranted
    `itemgetter(0)` instead of `lambda x: x[0]`
    `attrgetter('name')` instead of `lambda x: x.name`
- `sorted` returns a list, so no need to use `list(sorted(...))`
- Removed `dict()` using dictionary comprehensions whenever possible
- Attempted to remove python3.2 support

Signed-off-by: alexrecuenco <[email protected]>
2020-08-11 17:45:13 +07:00
Anca Iordache 79d6e122fd Merge pull request #7651 from aiordache/cleanup_version_only
Cleanup after v2-v3 schema merge
2020-08-10 11:26:20 +02:00
Vitor Anjos de1afd977d Fix typo
Signed-off-by: Vitor Anjos <[email protected]>
2020-08-10 10:32:45 +02:00
Vitor Anjos 17b41b27a8 Ignore build context path validation when it is not necessary
Signed-off-by: Vitor Anjos <[email protected]>
2020-08-10 10:32:45 +02:00
aiordache 7322dee672 Cleanup v*_only test decorators
Signed-off-by: aiordache <[email protected]>
2020-08-10 10:30:41 +02:00
Eric Hripko a8511e0884 Remove the now unneeded version qualifier
Signed-off-by: Eric Hripko <[email protected]>
2020-08-07 14:46:17 +01:00
Eric Hripko efb5601323 Implement service mode for ipc
Signed-off-by: Eric Hripko <[email protected]>
2020-08-07 14:43:46 +01:00
Anca Iordache d4f55a721d Merge pull request #7457 from EricHripko/run-healthy
[Compose Spec] Make 'run' behave in the same way as 'up'
2020-08-07 10:31:22 +02:00
Eric Hripko 06462cd604 Make run behave in the same way as up
Signed-off-by: Eric Hripko <[email protected]>
2020-08-06 23:11:39 +01:00
Anca Iordache debcdde27d Merge pull request #7543 from jarulsamy/7540-flag_nullifier
Add `--` as a separator of flags and arguments.
2020-08-04 14:28:14 +02:00
Anca Iordache a2095a2a0c Merge pull request #7510 from hartwork/issue-7501-stop-using-deprecated-assertequal
tests: Stop using deprecated assertEquals (fixes #7501)
2020-08-03 15:29:39 +02:00
aiordache cb56036a6e rename schema to compose_spec
Signed-off-by: aiordache <[email protected]>
2020-07-09 15:52:46 +02:00
aiordache c06b30548d cleanup compatibility and tests
Signed-off-by: aiordache <[email protected]>
2020-07-08 19:07:38 +02:00
aiordache b78c1ec193 Merge 2.x and 3.x schemas
Signed-off-by: aiordache <[email protected]>
2020-07-08 12:31:39 +02:00