Commit Graph

182 Commits

Author SHA1 Message Date
Wes Higbee 5f4b22ed7c make docs
Signed-off-by: Wes Higbee <wes.mcclure@gmail.com>
2024-01-08 17:21:26 -06:00
Nicolas De Loof e105f16527 introduce `stats` command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-12-22 16:03:02 +01:00
Nicolas De Loof 17da54da20 introduce build --with-dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-12-20 15:58:54 +01:00
Milas Bowman 85a1aec123 regen docs
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-12-05 18:08:38 +01:00
Milas Bowman 7c8ff36d78 move around OCI logic, auto fallback/retry 1.1 -> 1.0
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-12-05 18:08:38 +01:00
Amit Saha 750553c866 introduce compose logs --index to select a replica container
Signed-off-by: Amit Saha <asaha@atlassian.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-29 13:56:16 +01:00
Amit Saha f9946127ce Fix docs
Signed-off-by: Amit Saha <asaha@atlassian.com>
2023-11-29 13:56:16 +01:00
Amit Saha e981c35863 Add failing test
Signed-off-by: Amit Saha <asaha@atlassian.com>
2023-11-29 13:56:16 +01:00
Nicolas De Loof 16c4241c0b log we don't expose service ports when --verbose
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-29 11:40:16 +01:00
Nicolas De Loof caa0cbbc4b
Introduce ps --orphans so user can include/exclude services not declared by project
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-23 13:43:49 +01:00
Nicolas De Loof 2945532f97 fix --pull documentation
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-07 09:03:49 +01:00
Nicolas De Loof 6727908803 introduce --resolve-image-digests for publish to seal service images by digest
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-02 10:43:45 +01:00
aevesdocker 4cd61957ed fix build
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2023-10-31 10:50:42 +00:00
aevesdocker 0d4cbbdbc9 fix
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2023-10-31 10:44:59 +00:00
aevesdocker 9631a49daa ENGDOCS-1764
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2023-10-31 10:40:48 +00:00
Nicolas De Loof 44d21280e7 truncate command by default, introduce --no-trunc flag to get the full command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-09-23 06:34:26 +02:00
Guillaume Lours 6be5f3003a move watch from alpha to main command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-09-20 18:55:08 +02:00
Nicolas De Loof a697a0690a introduce pull --missing flag to only pull images not present in cache
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-09-15 08:41:27 +02:00
Guillaume Lours 1a98a70b8a add scale command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-09-13 11:15:14 +02:00
Milas Bowman d7b0b2bd7d
watch: build & launch the project at start (#10957)
The `alpha watch` command current "attaches" to an already-running
Compose project, so it's necessary to run something like
`docker compose up --wait` first.

Now, we'll do the equivalent of an `up --build` before starting the
watch, so that we know the project is up-to-date and running.

Additionally, unlike an interactive `up`, the services are not stopped
when `watch` exits (e.g. via `Ctrl-C`). This prevents the need to start
from scratch each time the command is run - if some services are already
running and up-to-date, they can be used as-is. A `down` can always be
used to destroy everything, and we can consider introducing a flag like
`--down-on-exit` to `watch` or changing the default.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-09-07 13:27:23 -04:00
Nicolas De Loof c9d54f09cf introduce publish (alpha) command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-09-07 07:27:32 +02:00
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