Commit Graph

3605 Commits

Author SHA1 Message Date
Bartłomiej Klimczak aa297a9969
remove unnecessary code
Signed-off-by: Bartłomiej Klimczak <bartlomiej.klimczak88@gmail.com>
2022-09-26 20:54:33 +02:00
Bartłomiej Klimczak 0d0a02cc6b
add more information when service.platform isn't part of service.build.platforms
Signed-off-by: Bartłomiej Klimczak <bartlomiej.klimczak88@gmail.com>
2022-09-26 20:44:59 +02:00
Guillaume Lours 3c641ed265
Merge pull request #9876 from milas/compose-go-1.6.0
ci: upgrade to compose-go v1.6.0
2022-09-26 19:42:19 +02:00
Milas Bowman f41eec4e09 ci: upgrade to compose-go v1.6.0
https://github.com/compose-spec/compose-go/releases/tag/v1.6.0

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-26 19:23:30 +02:00
Ulysses Souza 140dc519d3
cli: add shell completion function (#9269)
Integrates PR #9462 with additional fixes/changes.

Additional changes will be required to utilize this.

Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-09-26 13:21:45 -04:00
Guillaume Lours 279225896a
run: clean service command if entrypoint is overridden (#9836)
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-26 12:08:14 -04:00
Milas Bowman a95cc4074a
Remove support for `DOCKER_HOST` in `.env` files (#9871)
Revert "Merge pull request #9817 from ulyssessouza/apply-newly-loaded-envvars"

This reverts commit 126cb988c6, reversing
changes made to b80222fb07.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-26 09:26:01 -04:00
Guillaume Lours b4420c372b
Merge pull request #9866 from glours/issue-service-platform-on-up
keep the platform defined, in priority, via DOCKER_DEFAULT_PLATFORM o…
2022-09-26 10:32:43 +02:00
Guillaume Lours ce3700d334 keep the platform defined, in priority, via DOCKER_DEFAULT_PLATFORM or the service.plaform one if no build platforms provided
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-22 13:46:24 +02:00
Guillaume Lours e2a3fe9427
Merge pull request #9862 from glours/use-docker-export-if-no-build-platforms
configure default builder export when no build.platforms defined
2022-09-22 13:46:00 +02:00
Laura Brehm 94465d57cc
Merge pull request #9863 from docker/gha-win-mac-runners
Add `merge` GitHub Actions workflow to run tests on Windows and macOS runners
2022-09-21 16:39:27 +02:00
Laura Brehm 0dc64723c9
Restore `-s` in `uname` OS detection logic in `Makefile`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-21 10:19:00 -04:00
Laura Brehm 8891d9e2b5
Streamline GHA workflow
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-21 08:59:09 -04:00
Laura Brehm 6cd68a4bf2
Upgrade `actions/setup-go` to v3
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm a1984ca1de
Skip some tests in CI due to flakiness
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm 118b4f07e5
Increase E2E test timeouts to reduce flakiness
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm 8714f983ac
Temporarily disable broken E2E tests on Windows
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm 6bc50cb457
Rework Makefile for better Windows support
Fixes error when attempting to run `uname` on Windows, and add `.exe` to built binary on `make` if on Windows

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:31 -04:00
Laura Brehm 937fa2dc8f
Add GitHub Action workflow to run tests on Mac/Windows runners
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-20 11:33:28 -04:00
Guillaume Lours 71ab6c9eef
configure default builder export when no build.platforms defined
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-20 15:27:41 +02:00
Guillaume Lours db88241698
Merge pull request #9854 from glours/fix-docker-default-platform--without-build-platform
keep the platform defined via DOCKER_DEFAULT_PLATFORM during build if no build platforms provided
2022-09-20 10:00:10 +02:00
Laura Brehm 723078c593
Remove `/rebase` GitHub Action since it's no longer necessary
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-19 17:50:41 -04:00
Guillaume Lours a1c50ef2c9
keep the platform defined via DOCKER_DEFAULT_PLATFORM during build if no build platforms provided
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-16 22:19:31 +02:00
Laura Brehm 2977f4c897
Merge pull request #9849 from laurazard/fix-volumesfrom-overwriting
Keep `depends_on` condition when service has `volumes_from`
2022-09-15 10:45:48 -04:00
Laura Brehm cfdec21a7f
Fix linting issues
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-15 10:04:06 -04:00
Laura Brehm b564cc5a17
Don't overwrite existing dependency condition
(when service has `volumes_from` another service with dependency condition)

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-15 09:53:52 -04:00
Laura Brehm 43c444e890
Add unit tests for `PrepareVolumes`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-15 09:53:14 -04:00
Guillaume Lours b25a66bbd7
Merge pull request #9847 from glours/fix-service-platform--without-build-platform
keep the platform defined at service level during build if no build patforms provided
2022-09-15 10:49:42 +02:00
Guillaume Lours 0e975262da
keep the platform defined at service level during build if no build platforms provided
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-15 08:30:52 +02:00
Guillaume Lours c4d79e60b6
Merge pull request #9840 from glours/bump-compose-go-v1.5.1
update compose-go version to v1.5.1
2022-09-14 11:45:30 +02:00
Guillaume Lours ddc4896b10
update compose-go version to v1.5.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-14 11:02:58 +02:00
Guillaume Lours 9b863549ee
Merge pull request #9819 from milas/down-image-rm
build: label built images for reliable cleanup on `down`
2022-09-14 10:52:45 +02:00
Milas Bowman 801678686c add license to file
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-13 18:29:42 +01:00
Milas Bowman 403d691abf small cleanup + godoc
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-13 18:29:33 +01:00
Milas Bowman b49b9ffe7e Merge remote-tracking branch 'upstream/v2' into down-image-rm 2022-09-13 18:00:41 +01:00
Milas Bowman 680763f8b7 down: refactor image pruning
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-13 17:23:44 +01:00
Guillaume Lours 1ed37ef7bd
Merge pull request #9812 from milas/go-1.19.1
ci: upgrade to Go 1.19.1
2022-09-13 17:29:34 +02:00
Milas Bowman 42169db166 Merge remote-tracking branch 'upstream/v2' into go-1.19.1 2022-09-13 14:46:15 +01:00
Risky Feryansyah d05f5f5fa7
pull: improve output for services with both image+build (#9829)
When an image pull fails but the service has a `build` section, it
will be built, so it's not an unrecoverable error. It's now logged as
a warning - in situations where the image will _never_ exist in a
registry, `pull_policy: never` can & should be used, which will
prevent the error and avoid unnecessary pull attempts.

Signed-off-by: Risky Feryansyah Pribadi <riskypribadi24@gmail.com>
2022-09-13 14:38:13 +01:00
Guillaume Lours 5cc2c27abb
Merge pull request #9828 from Taha-Chaudhry/v2
Update README.md
2022-09-13 15:31:33 +02:00
Guillaume Lours 7b7189fe00
Merge pull request #9835 from docker/dependabot/go_modules/go.opentelemetry.io/otel-1.10.0
build(deps): bump go.opentelemetry.io/otel from 1.9.0 to 1.10.0
2022-09-13 11:53:45 +02:00
dependabot[bot] de1d969c37
build(deps): bump go.opentelemetry.io/otel from 1.9.0 to 1.10.0
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 09:42:35 +00:00
dependabot[bot] ab984d91af
build(deps): bump github.com/AlecAivazis/survey/v2 from 2.3.5 to 2.3.6 (#9830)
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.3.5 to 2.3.6.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.3.5...v2.3.6)

---
updated-dependencies:
- dependency-name: github.com/AlecAivazis/survey/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 10:27:14 +01:00
Taha-Chaudhry e413c2137a
Update README.md
Grammar corrections

Signed-off-by: Taha-Chaudhry <46199675+Taha-Chaudhry@users.noreply.github.com>
2022-09-11 17:28:35 +03:00
Milas Bowman 61845dd781
logs: filter to services from current Compose file (#9811)
* logs: filter to services from current Compose file

When using the file model, only attach to services
referenced in the active Compose file.

For example, let's say you have `compose-base.yaml`
and `compose.yaml`, where the former only has a
subset of the services but are both run as part of
the same named project.

Project based command:
```
docker compose -p myproj logs
```
This should return logs for active services based
on the project name, regardless of Compose file
state on disk.

File based command:
```
docker compose --file compose-base.yaml logs
```
This should return logs for ONLY services that are
defined in `compose-base.yaml`. Any other services
are considered 'orphaned' within the context of the
command and should be ignored.

See also #9705.

Fixes #9801.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-08 16:26:00 -04:00
Lucas Berg 7a8d157871
convert: do not escape $ into $$ when using the --no-interpolate option (#9703)
Signed-off-by: Lucas Berg <root.lucasberg@gmail.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
Co-authored-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-09-08 16:25:23 -04:00
Laura Brehm 88df5ede42
Merge pull request #9797 from laurazard/start-only-services
Only attempt to start specified services on `compose start [services]`
2022-09-08 13:00:20 -04:00
Laura Brehm a7cc406187
Cleanup E2E tests
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-08 12:49:42 -04:00
Ulysses Souza 126cb988c6
Merge pull request #9817 from ulyssessouza/apply-newly-loaded-envvars
Apply newly loaded envvars to "DockerCli" and "APIClient"
2022-09-08 18:35:51 +02:00
Laura Brehm 4c474fe029
Add unit tests to graph building logic in `dependencies.go`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-08 12:32:04 -04:00