Commit Graph

346 Commits

Author SHA1 Message Date
Laura Brehm 0d2beddf20
Add E2E tests for `up --exit-code-from`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-27 17:44:08 +02:00
Laura Brehm e5eb00f618
Merge pull request #9781 from laurazard/pull-image-latest
Pull image regardless of whether it exists locally if `tag=latest`
2022-08-23 17:49:41 +02:00
Laura Brehm 235734823e
Pull image regardless of whether it exists locally if `tag=latest`
... and pull policy is `missing` or `if_not_present`

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-23 16:57:40 +02:00
Michael Irwin d23c261c7d
Remove error message showing exit code when using --exit-code-from
Signed-off-by: Michael Irwin <mikesir87@gmail.com>

Resolves #9782
2022-08-23 10:47:54 -04:00
Nick Sieger 5723dee316
pull: only skip pull when policy is `missing`/`if_not_present`
Fixes #9773.

Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-08-22 09:22:20 -05:00
Laura Brehm f880b4129c
Merge pull request #9173 from KoditkarVedant/8768-avoid-pulling-same-image-multiple-times
Avoid pulling same images multiple times 
2022-08-19 16:28:55 +02:00
Vedant Koditkar a1d19119d2 Fix breaking test
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-19 15:25:22 +05:30
Vedant Koditkar b96b5449e5 Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times 2022-08-19 13:08:36 +05:30
Laura Brehm fcfcc1524e
Apply compose model on `compose kill`, add `--remove-orphans`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-19 04:26:08 +02:00
Ulysses Souza 6fe34c45ca
Merge pull request #9745 from ulyssessouza/apply-newly-loaded-envvars
Apply newly loaded envvars to "DockerCli" and "APIClient"
2022-08-18 22:49:21 +02:00
Ulysses Souza 0b4cb85c84 Code formatting
Just moving it up to make clearer

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 22:41:02 +02:00
Ulysses Souza 3f4f4e5975 Give environment variables precedence back to OS over .env
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 22:39:21 +02:00
Nick Sieger 09e6b0292a
up/start/run: don't wait for disabled service
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-08-17 12:32:10 -05:00
Nick Sieger 3c561e7017
create: pull all services logic out of loop; add DependsOn deps
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-08-17 11:48:45 -05:00
Vedant Koditkar 293cf21c58 Merge branch '8768-avoid-pulling-same-image-multiple-times' of github.com:KoditkarVedant/compose into 8768-avoid-pulling-same-image-multiple-times 2022-08-14 16:52:17 +05:30
Vedant Koditkar 25f4cb2ee6 Use compose to pull image twice
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-14 16:51:29 +05:30
Vedant Koditkar 817e875cbf
Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times 2022-08-13 12:19:49 +05:30
Vedant Koditkar 79ed1290a6 Use alpine:3.13.12 to be unique across the test cases
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-13 02:59:44 +05:30
Vedant Koditkar 4853ace155 Fix package name
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-13 02:06:28 +05:30
Vedant Koditkar de49bea774 Try changing package used to avoid any race condition in tests
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-12 23:06:51 +05:30
CrazyMax 5ec20296e4
Better sandboxed workflow and enhanced cross compilation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-12 15:05:58 +02:00
Vedant Koditkar 0db6dfee03 make compose pull tests more expressive
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-08-10 21:48:27 +05:30
Milas Bowman 27227a8824
lint: add `nolintlint` and clean up `nolint` directives (#9738)
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-09 16:43:58 -04:00
Milas Bowman 12ad0fddab
lint: run gofmt from Go 1.19 (#9728)
Fix comment formatting.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-08 11:36:57 -04:00
Vedant Koditkar e623b5ca1e Merge branch 'v2' into 8768-avoid-pulling-same-image-multiple-times 2022-08-06 17:58:10 +05:30
Milas Bowman 1ee44a0acb
config: use correct YAML marshal func (#9712)
The `compose-spec/compose-go` lib is written with `gopkg.in/yaml.v2`
as a target.

When marshalling via CLI (`compose convert` / `compose config`), we
were using a _different_ YAML lib, which was a fork of `go-yaml`,
which is what `gopkg.in/yaml.v2` is based off of.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-03 20:41:43 +00:00
Sebastiaan van Stijn 92f32b5c79
ci: use latest stable dockerfile syntax & rename docs Dockerfile (#9711)
* update dockerfiles to use latest stable syntax

Some Dockerfiles were pinned to a minor release, which meant they
wouldn't be updated to get the latest stable syntax (and fixes),
and one Dockerfile used the "labs" variant to use the HEREDOC syntax,
which has now been promoted to the stable syntax.

* docs: rename Dockerfile

There's no other Dockerfiles in the same path, so the "docs"
prefix was redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 16:36:13 -04:00
Laura Brehm c586ca4d0e Change `projectOrName()` to check COMPOSE_PROJECT_NAME env var
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-03 18:39:39 +02:00
Laura Brehm be495ab8e6 Filter `compose ps` output by provided compose model
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-02 22:33:26 +02:00
Laura Brehm d2a6c2c200 Add E2E tests for `compose stop` with compose file
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-02 22:33:26 +02:00
Nicolas De Loof f6e96dd783 if command is ran with a compose file, apply the compose model, not just project name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-08-02 22:33:26 +02:00
Milas Bowman 765c071c89
up: do not stop dependency containers (#9701)
This keeps parity with v1, where only the containers explicitly
passed to `up` are torn down when `Ctrl-C` is hit, so any
dependencies that got launched (or orphan containers hanging
around) should not be touched.

Fixes #9696.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-02 15:25:59 -04:00
ikedam bbaaa6a9de
config: case-insensitive env vars on Windows (#9438)
Signed-off-by: IKEDA Yasuyuki <devld@ikedam.jp>
2022-08-02 14:56:09 -04:00
Sebastiaan van Stijn 9db79856be
update usage strings for consistency
This updates the format of various usage strings to be more consistent
with other parts of the CLI.

- Use `[OPTIONS]` to indicate where command-specific options should be added
- Use `[SERVICE...]` to indicate zero-or-more services
- Remove some usage strings for specific options (e.g. `-e NAME=VAL`), as that
  option is part of the already mentioned `[OPTIONS]` and we don't provide usage
  for each possible option that can be passed.
- Remove `[--]`, which (I think) was needed for the Python implementation, but is
  a general feature to stop processing flag-options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-02 13:32:29 +02:00
Guillaume Lours 052469104f
switch tests back to '_' separator for networks and volumes
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-08-01 17:25:43 +02:00
Jeremiah Millay 8d84a12333 Fix LinkLocalIPs in V2
Signed-off-by: Jeremiah Millay <jmillay@fastly.com>
2022-07-29 21:19:34 +02:00
Ulysses Souza 9a131a0734
Merge pull request #9690 from ulyssessouza/fix-bump-compose-go-1.3.0
Fix go.mod on  replace for compose-go
2022-07-29 20:59:36 +02:00
Ulysses Souza c98e8ac3e1 Fix go.mod on replace for compose-go
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-29 20:49:10 +02:00
Kenny Millington 1d678b70d9
config: ignore image for config hash generation (#9350)
Do not set Image so it does not impact the config-hash

Signed-off-by: Kenny Millington <kenny@kennynet.co.uk>
2022-07-29 14:01:52 -04:00
Guillaume Lours 6d613c8cb2
Merge pull request #9636 from ulyssessouza/dotenvfile-priority
Environment variables priority
2022-07-29 19:42:50 +02:00
Guillaume Lours 150fd4b8cf
use '-' as separator by default for image name
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-29 18:55:22 +02:00
Guillaume Lours b49bd7c6ce
Merge pull request #9179 from ndeloof/no_build_image
as --no-build is set, set service image to default image name
2022-07-29 17:50:01 +02:00
Nicolas De Loof abf5f736c7
as --no-build is set, set service image to default image name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-29 17:41:53 +02:00
Robert Schumacher f69dec2da8 Fixes #9403: Remove Named Pipes from volumeMounts
If named pipe mounts are added to the volumeMounts mapping, the docker daemon will report an error that it cannot be mapped.

Signed-off-by: Robert Schumacher <ras0219@outlook.com>
2022-07-29 02:17:32 +02:00
Ulysses Souza e9c8cfcef3 Fix environment variables priority between environment and .env
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-28 12:57:44 +02:00
Ulysses Souza bac398aa9f Fix .env and --envfile priorities
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-28 12:13:37 +02:00
Guillaume Lours c4b9ec6301
remove unused sessionConfig param for addSecretsConfig function
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-22 17:37:42 +02:00
Guillaume Lours 75bbd245c7
Merge pull request #9647 from glours/add-test-named-networks
add 2 named networks with close name in the networks test suite to gu…
2022-07-19 16:55:26 +02:00
Guillaume Lours d85751f6d4
Merge pull request #9641 from glours/fix-volumes_from
keep the container reference when volumes_from target a container and not a service
2022-07-15 18:29:14 +02:00
Ulysses Souza fc723acb3b Fix nolint issues
Reference -> https://golangci-lint.run/usage/false-positives/#nolint-directive

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00