Nicolas De Loof
1054792b47
align docker compose ps with docker CLI to support --format
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-08-25 16:36:45 +02:00
Milas Bowman
caad72713b
up: handle various attach use cases better
...
By default, `compose up` attaches to all services (i.e.
shows log output from every associated container). If
a service is specified, e.g. `compose up foo`, then
only `foo`'s logs are tailed. The `--attach-dependencies`
flag can also be used, so that if `foo` depended upon
`bar`, then `bar`'s logs would also be followed. It's
also possible to use `--no-attach` to filter out one
or more services explicitly, e.g. `compose up --no-attach=noisy`
would launch all services, including `noisy`, and would
show log output from every service _except_ `noisy`.
Lastly, it's possible to use `up --attach` to explicitly
restrict to a subset of services (or their dependencies).
How these flags interact with each other is also worth
thinking through.
There were a few different connected issues here, but
the primary issue was that running `compose up foo` was
always attaching dependencies regardless of `--attach-dependencies`.
The filtering logic here has been updated so that it
behaves predictably both when launching all services
(`compose up`) or a subset (`compose up foo`) as well
as various flag combinations on top of those.
Notably, this required making some changes to how it
watches containers. The logic here between attaching
for logs and monitoring for lifecycle changes is
tightly coupled, so some changes were needed to ensure
that the full set of services being `up`'d are _watched_
and the subset that should have logs shown are _attached_.
(This does mean faking the attach with an event but not
actually doing it.)
While handling that, I adjusted the context lifetimes
here, which improves error handling that gets shown to
the user and should help avoid potential leaks by getting
rid of a `context.Background()`.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-08-18 12:38:38 +02:00
Milas Bowman
baea5a48f5
deps: bump docker/cli-docs-tool to v0.6.0
...
Required re-running `make docs` to pick up changes.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-07-10 12:23:48 +02:00
Nicolas De Loof
b0af2deb2b
when --index is not set select first service container
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-07-07 14:08:24 +02:00
Guillaume Lours
28301fb1a4
add support of --builder and BUILDX_BUILDER
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-07-03 10:11:18 +02:00
Ulysses Souza
edd76bfd70
Add `docker compose wait`
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2023-06-30 16:07:03 +02:00
aroramrinaal
3906a7a67c
Updated documentation files for my contribution
...
Ran 'make docs' to generate updated doc files from the reference.
Signed-off-by: aroramrinaal <aroramrinaal@gmail.com>
2023-06-27 22:48:17 +02:00
aroramrinaal
83671db3dd
Fix capitalization error in sentence by adding an uppercase letter at beginning
...
Signed-off-by: aroramrinaal <aroramrinaal@gmail.com>
2023-06-27 22:48:17 +02:00
Nicolas De Loof
c61b8aa5ac
introduce run --cap-add to run maintenance commands using service image
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-06-19 14:20:20 +02:00
Nicolas De Loof
cfe91becc7
use `--progress` to configure progress UI stylet push
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-06-12 16:53:42 +02:00
robbert-ef
68bd0eb523
cli: fix timeout behavior on up / restart / stop ( #10672 )
...
Do not set a hardcoded default timeout of 10 seconds when restarting / stopping but use the container `StopTimeout` (defaults to 10 seconds).
Also fixed custom timeout not used when invoking `up`.
Signed-off-by: Robbert Segeren <robbert.segeren@easyflex.nl>
2023-06-12 09:18:25 -04:00
Allie Sadler
65b714c108
fix build issue
...
Signed-off-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
2023-05-31 10:24:49 +01:00
Allie Sadler
44dd232e97
Merge branch 'v2' into ENGDOCS-1373
2023-05-31 10:18:45 +01:00
Guillaume Lours
15cad92b61
fix display of volumes flag in down help command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-05-24 22:11:58 +02:00
Nicolas De Loof
93bd27a0cc
introduce ability to select service to be stopped by `compose down`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-05-24 17:32:32 +02:00
Allie Sadler
1e399c271a
update docs to reflect dry run mode is feature complete
...
Signed-off-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
2023-05-23 15:53:48 +01:00
Nicolas De Loof
9b5a4588f9
introduce --no-path-resolution to skip relative path to be resolved
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-05-16 13:02:56 +02:00
Guillaume Lours
312f0d1d61
Update dry-run documentation
...
Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-05-15 09:39:46 +02:00
Guillaume Lours
e8caad1903
move dry-run support from alpha to main command
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-05-15 09:39:46 +02:00
Nicolas De loof
0e375a8c61
restore long description to be included in `docker compose help` ( #10504 )
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-05-11 12:33:45 -04:00
Nicolas De Loof
d01ef5887a
restore support for `--memory`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-04-25 15:41:08 +02:00
Benjamín Guzmán
3751c3074b
Added docs
...
Signed-off-by: Benjamín Guzmán <bg@benjaminguzman.dev>
2023-04-24 12:18:37 +02:00
Nicolas De Loof
a10c4c6df5
restore `--timeout` flag renamed by mistake
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-04-04 08:48:00 +02:00
Guillaume Lours
6bedc196cc
update -p project name flag documentation
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-22 10:53:54 +01:00
Nicolas De Loof
e831ea826b
add support for `restart` for `depends_on`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-18 12:55:29 +01:00
Nicolas De Loof
9ac0392baf
introduce --timeout on `up`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-14 12:16:41 +01:00
Nicolas De Loof
0612b34c68
introduce --no-deps on restart
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-02-14 11:30:15 +01:00
Nicolas De Loof
41e056341b
rename `convert` to `config` to align with compose v1 UX
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-30 22:23:53 +01:00
Laura Brehm
69c0a583be
Merge pull request #10208 from laurazard/add-scale-create
2023-01-27 15:26:01 +01:00
maxcleme
634a7d2a7b
Support for docker compose build --push when using multiple platforms
...
Signed-off-by: maxcleme <maxime.clement@docker.com>
2023-01-26 16:54:41 +01:00
Laura Brehm
a288332fbd
Update docs to add `--scale` argument to `compose create`
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-26 13:03:49 +01:00
Nicolas De Loof
33c3f4dfad
alias -n for --tail to align with docker CLI
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-26 10:00:58 +01:00
Laura Brehm
d47f0f31c2
Update docs to mention `COMPOSE_PARALLEL_LIMITS` and ways to configure parallelism
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-01-24 17:01:15 +01:00
Nicolas De Loof
4721c01702
fix docs to reflect docker compose ps being aligned with docker ps
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-01-24 11:11:20 +01:00
Guillaume Lours
eb59b0e265
add alpha command to test dry-run
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
5081ab0507
create custom CLI when dry-run mode active
...
update documentation
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +01:00
Guillaume Lours
fbf845c5f8
add dry-run flag
...
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-16 11:11:35 +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
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
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
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
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
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
Laura Brehm
8a3248d0cd
Update documentation
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-12-29 13:32:16 +00:00
Nicolas De Loof
84ea395d5d
introduce --timestamp option on compose up
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-15 12:14:22 +01:00
Gabriel Féron
e4850d9c48
Add --include-deps to push command
...
Signed-off-by: Gabriel Féron <g@leirbag.net>
2022-12-15 11:42:14 +01:00
Nicolas De Loof
8c39b5b7fd
align `--format` flag and UX with docker cli
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-14 22:53:43 +01:00
Nicolas De Loof
a0acc20d88
introduce --parallel to limit concurrent engine calls
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-06 08:15:50 +01:00