Commit Graph

3932 Commits

Author SHA1 Message Date
Guillaume Lours 5a2b7b83cd use compose service methods when exist instead of directly service.dockerCli
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-13 21:02:00 +01:00
Nicolas De Loof 8c07fa4d25 mark alpha command as experimental
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-12 14:44:18 +01:00
Laura Brehm db267d86c1
Merge pull request #10169 from laurazard/fix-terminal-height
Adjust terminal height calc
2023-01-12 11:21:34 +01:00
Laura Brehm 9daf41892f
Adjust terminal height calc
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-12 11:20:05 +01:00
Laura Brehm 2aa88b5c9e
Merge pull request #10149 from TColl/typo-fix
fix typo
2023-01-12 10:56:28 +01:00
Nicolas De Loof bb9cf32245 introduce experimental watch command (skeletton)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-12 10:52:58 +01:00
Laura Brehm 7212aaff2e
Merge pull request #10166 from matthewarmand/run-remove-orphans
Add remove-orphans functionality to run
2023-01-12 10:18:47 +01:00
Laura Brehm 69a09624c9 Skip child events when printer events > terminal height
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-12 09:52:25 +01:00
Tom Collingwood f2088bb917 fix typo
Signed-off-by: Tom Collingwood <tomcollingwood@yahoo.co.uk>
2023-01-11 19:07:29 +00:00
Matt Armand dadad01e63 Update docs programatically like you're supposed to
Signed-off-by: Matt Armand <marmand68@gmail.com>
2023-01-11 13:20:30 -05:00
Matt Armand 1adc9f54d5 fix docs yaml
Signed-off-by: Matt Armand <marmand68@gmail.com>
2023-01-11 12:24:15 -05:00
Matt Armand 4cebce3a5c This option lives in the create options, not the run options
Signed-off-by: Matt Armand <marmand68@gmail.com>
2023-01-11 12:07:51 -05:00
Matt Armand bd8e57447a Add remove-orphans functionality to run, because it recommends that in error messages
Signed-off-by: Matt Armand <marmand68@gmail.com>
2023-01-11 10:31:56 -05:00
Laura Brehm 4ad87463c5 Add 🥒 GHA workflow
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-11 14:13:10 +01:00
Laura Brehm 62b3e7409e
Merge pull request #10124 from laurazard/fix-cucumber-tests
Fix Cucumber 🥒 tests
2023-01-11 13:00:04 +01:00
Nicolas De Loof cc912c625d introduce --remove-orphans in compose create command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-11 07:16:50 +01:00
Laura Brehm cc7e69c02d
Merge pull request #10142 from docker/dependabot/go_modules/github.com/containerd/containerd-1.6.15
build(deps): bump github.com/containerd/containerd from 1.6.14 to 1.6.15
2023-01-10 12:44:46 +00:00
Nicolas De Loof 3e12a7cb23 pass proxy config as build args - same as docker/buildx#959
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-10 12:15:13 +01:00
Ulysses Souza 0c1979979f Remove unused kube tag
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2023-01-09 14:52:11 +01:00
Guillaume Lours 00c60da331
Merge pull request #10151 from freeformz/ffz/NoShareMap
Don't share the options map
2023-01-09 12:13:48 +01:00
Edward Muller 73ebbffb08 Don't share the options map
Without this I get an exception when building multiple images in a
compose run.

```
fatal error: concurrent map writes

goroutine 16 [running]:
github.com/docker/compose/v2/pkg/compose.(*composeService).build.func1({0x2cba4e0, 0xc00019b2c0}, {0xc000233150?, 0xd?})
        github.com/docker/compose/v2/pkg/compose/build.go:95 +0x652
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:127 +0x63
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
        golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
...
```

I'm not sure why the map is currently shared, but with this patch
applied my docker-compose build run works.

Signed-off-by: Edward Muller <emuller@fastly.com>
2023-01-09 12:01:57 +01:00
Guillaume Lours fbbc0dedcf
Merge pull request #10145 from ndeloof/ps_filter
don't filter by services if no filter was set
2023-01-09 12:01:28 +01:00
Nicolas De Loof b326a9da1d
don't filter by services if no filter was set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-09 11:49:08 +01:00
Nicolas De Loof f1313f3a09 use a simpler prompt implementation when we lack a terminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-09 10:28:16 +01:00
fsl a226d014b8 fix CVE-2022-27664 and CVE-2022-32149 high-risk vulnerability
Signed-off-by: fsl <1171313930@qq.com>
2023-01-06 19:32:12 +01:00
dependabot[bot] 7e2af3aa81
build(deps): bump github.com/containerd/containerd from 1.6.14 to 1.6.15
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.14 to 1.6.15.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.14...v1.6.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 09:06:22 +00:00
Nicolas De Loof 96bbda98f8 add support for uts namespace
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-06 08:15:52 +01:00
Guillaume Lours f6f29a4438
Merge pull request #10133 from ndeloof/build_concurrency
limit build concurrency according to --parallel
2023-01-05 09:57:13 +01:00
Nicolas De Loof aa5cdf2bf9 add support for COMPOSE_PARALLEL_LIMIT (parity with Compose v1)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-04 12:42:49 +01:00
Nicolas De Loof d5e4f00644 introduce --no-attach to ignore some service output
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 18:43:40 +01:00
Nicolas De Loof 8b4ac37f9c introduce `--ignore-buildable` to ignore buildable images on pull
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 18:43:23 +01:00
Nicolas De Loof b96e27e0e7 limit build concurrency according to --parallel
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-03 12:01:30 +01:00
Guillaume Lours dcbd68a102
Merge pull request #10136 from gtardif/fix_race_delete_orphan_containers
Ignore not only auto-removed containers but also "removal in progress" for orphan containers
2023-01-03 11:30:04 +01:00
Guillaume Tardif 37d15d7e6b Ignore not only auto-removed containers but also "removal in progress" for orphan containers
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2023-01-03 11:09:41 +01:00
Laura Brehm dde7eea212
Update expected Cucumber `compose ps` output to match changes
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-12-30 15:07:58 +00:00
Laura Brehm a224780795 Set `pullChanged` when setting `--pull` on `compose up`
Add e2e tests

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-12-30 13:56:06 +01:00
Ákos Takács ffce33ec11 Fix empty file when using compose config in case of smaller source files
"docker compose config --output out.yml" resulted an empty file
when the generated output was smaller than 4097 bytes.
bufio.Writer doesn't seem necessary since only one write operation will happen.
This way there is no need for a new bufio.Writer that could be flushed.

Thanks for @thaJeztah for the idea of using os.WriteFile

Issue https://github.com/docker/compose/issues/10121

Signed-off-by: Ákos Takács <takacs.akos@it-sziget.hu>
2022-12-30 13:51:36 +01:00
Laura Brehm 1d9657aee2
Merge pull request #10127 from docker/dependabot/go_modules/github.com/docker/cli-docs-tool-0.5.1
build(deps): bump github.com/docker/cli-docs-tool from 0.5.0 to 0.5.1
2022-12-29 13:42:43 +00:00
Laura Brehm 8a3248d0cd
Update documentation
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-12-29 13:32:16 +00:00
dependabot[bot] 52e7f0fb3e
build(deps): bump github.com/docker/cli-docs-tool from 0.5.0 to 0.5.1
Bumps [github.com/docker/cli-docs-tool](https://github.com/docker/cli-docs-tool) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/docker/cli-docs-tool/releases)
- [Commits](https://github.com/docker/cli-docs-tool/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/docker/cli-docs-tool
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-29 09:06:01 +00:00
Guillaume Lours fd353ffa94 add support of privileged attribut in service.build section
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-23 09:32:48 +01:00
Guillaume Lours 0307c16daf
Merge pull request #10116 from glours/add-buildx-plugin-e2e
cleanup framework.go from uncessary debug logs
2022-12-21 21:39:23 +01:00
Guillaume Lours adf8e75317 cleanup framework.go from uncessary debug logs
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 21:28:06 +01:00
Guillaume Lours 6c537cc0f4
Merge pull request #10113 from glours/add-buildx-plugin-e2e
add buildx plugin to e2e configuration directory
2022-12-21 21:21:01 +01:00
Nicolas De Loof 9f7ad18d62 reduce cyclomatic complexity
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-21 21:12:06 +01:00
Nicolas De Loof 40ebcd6203 fix security opts support (seccomp and unconfined)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-21 21:12:06 +01:00
Nicolas De Loof 9bd9f1765c check service names based on project, not running containers
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-21 21:11:44 +01:00
Guillaume Lours 5dcadc05d9
debut output for CI
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 21:09:49 +01:00
Guillaume Lours c72f161afb
change the way finding the just built compose binary
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 19:47:39 +01:00
Guillaume Lours 86a648bd51
e2e tests display Compose version used to run the test
currently the version displayed is the one installed and not the one use for the tests

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-21 18:38:24 +01:00