Commit Graph

3092 Commits

Author SHA1 Message Date
Tymoteusz Blazejczyk 340b5482b0 Changed to the official compose-spec/compose-go
Changes were merged. Updated the `replace` directive in the `go.mod`
file to the latest official package.

Signed-off-by: Tymoteusz Blazejczyk <tymoteusz.blazejczyk@tymonx.com>
2022-01-03 08:04:34 +01:00
Tymoteusz Blazejczyk faaa93bf12 Added volume bind option SELinux label :z :Z
Added unsupported volume bind option SELinux label `:z` and `:Z` in v2.

It is a regression compared to v1 written in Python.

The v2 uses the compose-spec/compose-go to parse Compose YAML
specification files but there was missing support for volume bind option
SELinux label `:z` and `:Z` in parser. It is fixed in:

- https://github.com/compose-spec/compose-go/pull/213

It fixes #9072

References:

- https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label

Signed-off-by: Tymoteusz Blazejczyk <tymoteusz.blazejczyk@tymonx.com>
2022-01-03 08:04:34 +01:00
dependabot[bot] 381df20010 Bump github.com/AlecAivazis/survey/v2 from 2.2.3 to 2.3.2
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.2.3 to 2.3.2.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.2.3...v2.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 15:19:03 +01:00
dependabot[bot] a9e8164a8d Bump github.com/containerd/console from 1.0.2 to 1.0.3
Bumps [github.com/containerd/console](https://github.com/containerd/console) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/containerd/console/releases)
- [Commits](https://github.com/containerd/console/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: github.com/containerd/console
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 15:09:03 +01:00
Lance Chen 1191023fb6 Propagate GroupAdd from ServiceConfig to HostConfig
The `group_add` key is parsed correctly from a compose file, but it is not
passed into the `ContainerCreate` API call, thus the configuration does
not take effect. This commit fixes the issue by propagating the
configuration from Docker compose's ServiceConfig to Docker container's
HostConfig.

Signed-off-by: Lance Chen <hello@lancechen.tw>
2021-12-17 15:08:14 +01:00
dependabot[bot] a108690ac2 Bump github.com/buger/goterm from 1.0.0 to 1.0.3
Bumps [github.com/buger/goterm](https://github.com/buger/goterm) from 1.0.0 to 1.0.3.
- [Release notes](https://github.com/buger/goterm/releases)
- [Commits](https://github.com/buger/goterm/compare/v1.0.0...v1.0.3)

---
updated-dependencies:
- dependency-name: github.com/buger/goterm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 14:59:02 +01:00
dependabot[bot] 0e81d1c88e Bump github.com/hashicorp/go-multierror from 1.1.0 to 1.1.1
Bumps [github.com/hashicorp/go-multierror](https://github.com/hashicorp/go-multierror) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/hashicorp/go-multierror/releases)
- [Commits](https://github.com/hashicorp/go-multierror/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-multierror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 07:39:21 +01:00
dependabot[bot] 22002531d8 Bump github.com/spf13/cobra from 1.2.1 to 1.3.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 06:24:57 +01:00
dependabot[bot] b66ff0c3d8 Bump github.com/golang/mock from 1.5.0 to 1.6.0
Bumps [github.com/golang/mock](https://github.com/golang/mock) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/golang/mock/releases)
- [Changelog](https://github.com/golang/mock/blob/master/.goreleaser.yml)
- [Commits](https://github.com/golang/mock/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/golang/mock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-17 06:24:35 +01:00
Ulysses Souza 7b6439997d Fix output redirection on command run
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-15 15:10:22 +01:00
Ulysses Souza d37b3fe413
Merge pull request #9036 from ulyssessouza/add-dependabot
Add dependabot
2021-12-15 10:38:28 +01:00
Ulysses Souza ce7a2412b1 Add dependabot
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-14 16:19:41 +01:00
Ulysses Souza 9e52e9fbe3
Merge pull request #9004 from ndeloof/cp_stopped
compose cp doesn't need a full project and can copy from stopped containers
2021-12-14 14:27:51 +01:00
Nicolas De Loof c5b7624d10
compose cp doesn't need a full project and can copy from stopped container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-12-12 16:15:56 +01:00
Ulysses Souza cf7319fc6e Only kill running containers
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-10 08:48:38 +01:00
Nicolas De Loof 740276f550 handle "stop" event
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-12-09 13:57:52 +01:00
Ulysses Souza 40bca10250
Merge pull request #9007 from ulyssessouza/add-test-modes
Add 2 modes test mechanism
2021-12-09 11:16:37 +01:00
Ulysses Souza 8ae8d99528 Use build tags for selecting e2e test mode
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-09 10:52:18 +01:00
Jon Cram f03b7085c3 compose ps: fix typo "unknow" -> "unknown"
Signed-off-by: Jon Cram <webignition@gmail.com>
2021-12-09 08:56:35 +01:00
Ulysses Souza 36c2947e4d
Merge pull request #9012 from notok/rm_containers_when_build_succeed
Remove intermediate containers when build succeeded in classic build
2021-12-08 12:39:10 +01:00
notok 3bbcc3d4d0 Fix lint error
Signed-off-by: notok <noto.kazufumi@gmail.com>
2021-12-08 18:42:00 +09:00
notok b47d8ea868 Remove intermediate containers when build succeeded
Intermediate containers remain even when build succeeded
when building with classic way (i.e. not with buildkit).
Remove them when build succeeded like default behavior of docker build.

Signed-off-by: notok <noto.kazufumi@gmail.com>
2021-12-08 04:18:05 +09:00
Ulysses Souza a97a73600e Add 2 modes test mechanism
This should test on plugin and standalone mode

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-07 10:25:50 +01:00
Nicolas De Loof 6735220557 ignore missing (swarm) overlay networks
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-12-06 14:06:34 +01:00
Kevin Roy d7d29b25bc compose images should list created containers images
Signed-off-by: Kevin Roy <kiniou@gmail.com>
2021-12-05 10:59:25 +01:00
Ulysses Souza e2f33af831 Merge and fix Convert function from `docker/compose-switch`
This also removes the vendoring of the repo
Note that it fixes the problem of double "compose" on calling
the compose plugin with "docker" root flags.
Like in "docker --context default compose version"

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-03 12:17:17 +01:00
Guillaume Lours 19b9fdf536 upgrade version of opencontainers/image-spec (security issue)
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-03 12:16:14 +01:00
Guillaume Lours a842522f49 use filepath instead of path to check if the dockerfile path is abolute or not
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-03 12:15:22 +01:00
Ulysses Souza bc1160de72 Turn external volume usage into a warning instead of erroring
This avoids a compatibility break since returning an error would avoid
the project to be started

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-12-02 13:11:20 +01:00
Ulysses Souza f791bc8a42
Merge pull request #8984 from ndeloof/logs_restart
compose logs to notify printer about container lifecycle events
2021-12-02 09:27:11 +01:00
Nicolas De Loof 0d7567131a
compose logs to notify printer about container lifecycle events
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-12-02 09:18:49 +01:00
Mathieu Champlon 7b84f2c2a5
Merge pull request #8974 from ulyssessouza/fix-links-resolution3
Return an error when failing to list containers
2021-11-29 10:34:00 +01:00
Ulysses Souza cf7b1441d9 Return an error when failing to list containers
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-29 10:28:45 +01:00
Mathieu Champlon 32005b0bfe
Merge pull request #8953 from ulyssessouza/test-multiargs
Add multiargs build e2e tests
2021-11-29 09:46:47 +01:00
Mathieu Champlon 025a72a417
Merge pull request #8972 from ulyssessouza/fix-links-resolution2
Refactoring variable name
2021-11-29 09:46:24 +01:00
Ulysses Souza 95c4502b81 Refactoring variable name
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-28 15:43:27 +01:00
Ulysses Souza 2290ce2c24
Merge pull request #8970 from ndeloof/external_volume_check
Don't check compose labels on external volumes
2021-11-28 15:36:48 +01:00
Nicolas De Loof bac732837e
Don't check compose labels on external volumes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-27 16:34:42 +01:00
Ulysses Souza b725c56c42 Fix links resolution
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-26 20:20:55 +01:00
Ulysses Souza cfcc9533b3 Add multiargs build e2e tests
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-25 21:22:30 +01:00
Mathieu Champlon cffdb69c5e Fix test config dir content
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-11-25 21:22:30 +01:00
Kyungsik Park 709190312c Fix to use Key instead of Service for graph updates
Signed-off-by: Kyungsik Park <kay.pak@naverlabs.com>
2021-11-24 08:02:50 +01:00
Mathieu Champlon e1a38f984b
Merge pull request #8947 from ndeloof/run_quietpull
introduce run —quiet-pull to align with up
2021-11-23 19:17:08 +01:00
Nicolas De Loof 4dafeb57a5 introduce run —quiet-pull to align with up
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-23 19:14:12 +01:00
Nicolas De Loof 45956c36fb introduce docker compose config --images
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-23 19:13:04 +01:00
Ulysses Souza 9eb69465b7
Merge pull request #8834 from akerouanton/fix-start-0-replicas
v2: Don't try to start services with 0 replicas
2021-11-23 14:53:08 +01:00
Albin Kerouanton 5f392258cb Don't try to start services with 0 replicas
When a service has 0 replicas to start, it don't try to create any
container. However `composeService.startService()` still gets executed.
This method checks if there's been containers created for that service
beforehand. If there's none, it returns the following error: `no
containers to start`.

This change checks if replicas == 0 and exits early from
`composeService.startService()` when that's the case.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2021-11-23 11:57:09 +01:00
Mathieu Champlon 382c1cd68e
Merge pull request #8943 from ndeloof/config_no_normalize
don't normalize compose model in compatibility mode
2021-11-23 11:16:36 +01:00
Mathieu Champlon 5994050f51
Merge pull request #8956 from mat007/bump-compose-go
Bump compose-go to v1.0.8
2021-11-23 11:10:57 +01:00
Mathieu Champlon 28a00571ef Bump compose-go to v1.0.8
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-11-23 11:05:26 +01:00