Commit Graph

424 Commits

Author SHA1 Message Date
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 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
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
Nicolas De Loof 24f83271f2 don't assume os.Stdout and rely on dockerCLI.streams
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-20 23:52:25 +01:00
Tiger Wang 89ef8198f3 update projectOptions to be public by renaming it to ProjectOptions
Signed-off-by: Tiger Wang <tigerwang@outlook.com>
2022-12-20 08:53:27 +01:00
Guillaume Lours 0fedddb008
Merge pull request #10083 from ndeloof/nodeps
use recently introduced `withSelectedServicesOnly` to reduce code duplication
2022-12-15 15:51:29 +01:00
Nicolas De Loof 84984864c8 load project from explicit --files when set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-15 15:38:41 +01:00
Nicolas De Loof 8566daa96e use recently introduced `withSelectedServicesOnly` to reduce code duplication
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-15 15:38:18 +01: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 1cb5536a2e Address review comments
Signed-off-by: Gabriel Féron <g@leirbag.net>
2022-12-15 11:42:14 +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 bc568eeb9b align `compose ps` output with `docker ps`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-14 22:53:43 +01:00
Nicolas De Loof d4a4dcf4ee resolve --env-file as absolute path
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-14 09:43:32 +01:00
Nicolas De Loof 0368f19030 distinguish stdout and stderr in `up` logs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-13 14:42:42 +01:00
Nicolas De Loof 804d7163a7 detect required service are gone to stop watching
explicit API to stop the log printer

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-07 21:07:27 +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
Milas Bowman 053f20edab
port: improve error-handling if port not found (#10039)
This method looked slightly incomplete. If the port wasn't found,
it'd return `err`, but that was always `nil`, so we'd print out
`:0`.

Now, we construct a nice error message with the targeted port and
the ones we found.

The `--protocol` flag is also now case-insensitive to prevent any
weirdness/confusion there.

Co-authored-by: Nick Sieger <nicksieger@gmail.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-12-05 22:11:45 +00:00
Guillaume Lours 7cf5940f4a
Merge pull request #10035 from ndeloof/9323
use StringToBool to detect COMPOSE_IGNORE_ORPHANS
2022-12-01 10:06:21 +01:00
Nicolas De Loof 7369127650
use StringToBool to detect COMPOSE_IGNORE_ORPHANS
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-12-01 09:38:57 +01:00
windforce17 2e7644ff21 use api.Separator to print right image names
Signed-off-by: windforce17 <wzcboss@qq.com>
2022-12-01 09:20:09 +01:00
Nicolas De Loof 9ac4f69918 move image digests resolution to backend
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-11-30 21:18:18 +01:00
Guillaume Lours 24ec0b2d09 pass services list to projectOrName function to add profiles for targeted services
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-30 13:21:16 +01:00
Nicolas De Loof c3e5e49957 configure buildx for plain output if --ansi=never has been set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-11-24 16:02:04 +01:00
Laura Brehm 88c3aaf1bf
Merge pull request #10007 from laurazard/add-build-run
Add `--build` to `compose run`
2022-11-17 20:00:57 +01:00
Laura Brehm 35d31cc500
Add `--build` option to `compose run`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-11-17 00:57:35 +01:00
Guillaume Lours c53539e1cc
Merge pull request #9906 from glours/profiles-priority
use COMPOSE_PROFILES value only if no command line arg profiles used
2022-11-15 18:03:11 +01:00
Guillaume Lours 32f29b833f add --no-consistency flag to convert command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-15 10:31:59 +01:00
Guillaume Lours 533fc61634 use COMPOSE_PROFILES value only if no command line arg profiles used
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-15 10:13:17 +01:00
Sebastiaan van Stijn 34e945a598
ci: remove uses of deprecated gotest.tools v2 (#9935)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-07 14:07:41 -05:00
Vedant Koditkar 1d4cb32001
Add support to push images quietly via compose cli
Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-10-11 15:19:23 -05: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
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
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 209293e449
Restrict compose project to selected services and dependencies on `compose start`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-09-08 12:31:55 -04:00
Ulysses Souza 79af3cdd85 Apply newly loaded envvars to "DockerCli" and "APIClient"
Re-evaluate DockerCli and APIClient after reading the environment file.
I can contain DOCKER_HOST and/or DOCKER_CONTEXT so the DockerCli passed by docker/cli has to be re-evaluated.
Also checks for DOCKER_CERT_PATH and DOCKER_TLS_VERIFY.

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-09-08 18:23:18 +02:00
Guillaume Lours 537f023a3b fix panic when using 'compose up --build'
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-02 15:44:55 +02:00
Guillaume Lours 8b1b70833e add support of platforms in build section
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-09-02 15:44:55 +02:00
Milas Bowman f3e0c386d2
Revert "Apply newly loaded envvars to `DockerCli` and `APIClient`" (#9792)
Revert "Merge pull request #9745 from ulyssessouza/apply-newly-loaded-envvars"

This reverts commit 6fe34c45ca, reversing
changes made to 10cfd551e3.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-26 16:03:45 -04:00
Laura Brehm fcfcc1524e
Apply compose model on `compose kill`, add `--remove-orphans`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-19 04:26:08 +02:00
Ulysses Souza 6fe34c45ca
Merge pull request #9745 from ulyssessouza/apply-newly-loaded-envvars
Apply newly loaded envvars to "DockerCli" and "APIClient"
2022-08-18 22:49:21 +02:00
Ulysses Souza 0b4cb85c84 Code formatting
Just moving it up to make clearer

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 22:41:02 +02:00
Ulysses Souza 3f4f4e5975 Give environment variables precedence back to OS over .env
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 22:39:21 +02:00
Ulysses Souza 86c925fbd3 Reset the DockerCli and APIClient after loading the environment file
This forces a re-evaluation of the environment variables.

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-08-18 16:42:56 +02:00
CrazyMax f5a1bb875d
root: filter out commandConn.Close* warning message
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-12 23:49:02 +02:00
Milas Bowman 27227a8824
lint: add `nolintlint` and clean up `nolint` directives (#9738)
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-08-09 16:43:58 -04:00
Guillaume Lours c47079e795 don't apply default pull policy from command line if one is define in service configuration
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-08-05 12:01:32 +02:00
Khoa Le 8d4846f210
docs: remove extra whitespaces in help text (#9710)
Remove superfluous whitespaces

Signed-off-by: Khoa Le <ltkhoa2711@gmail.com>
2022-08-03 16:37:15 -04:00
Laura Brehm c586ca4d0e Change `projectOrName()` to check COMPOSE_PROJECT_NAME env var
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-03 18:39:39 +02:00
Laura Brehm be495ab8e6 Filter `compose ps` output by provided compose model
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-02 22:33:26 +02:00
Nicolas De Loof f6e96dd783 if command is ran with a compose file, apply the compose model, not just project name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-08-02 22:33:26 +02:00
Sebastiaan van Stijn 9db79856be
update usage strings for consistency
This updates the format of various usage strings to be more consistent
with other parts of the CLI.

- Use `[OPTIONS]` to indicate where command-specific options should be added
- Use `[SERVICE...]` to indicate zero-or-more services
- Remove some usage strings for specific options (e.g. `-e NAME=VAL`), as that
  option is part of the already mentioned `[OPTIONS]` and we don't provide usage
  for each possible option that can be passed.
- Remove `[--]`, which (I think) was needed for the Python implementation, but is
  a general feature to stop processing flag-options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-02 13:32:29 +02:00
Guillaume Lours 1eeb12fe1e
Merge pull request #9698 from laurazard/dont-load-composefile-version
Overwrite parent commands PreRun code for `compose version`
2022-08-01 12:14:14 +02:00
Laura Brehm c9876f4c66 Overwrite parent commands PreRun code for `compose version`
.. to avoid trying (and failing) to load a compose file if the COMPOSE_FILE env var is set such as `COMPOSE_FILE=foo compose version`

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-08-01 11:44:05 +02:00
Guillaume Lours 6d613c8cb2
Merge pull request #9636 from ulyssessouza/dotenvfile-priority
Environment variables priority
2022-07-29 19:42:50 +02:00
Guillaume Lours 150fd4b8cf
use '-' as separator by default for image name
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-29 18:55:22 +02:00
Guillaume Lours b49bd7c6ce
Merge pull request #9179 from ndeloof/no_build_image
as --no-build is set, set service image to default image name
2022-07-29 17:50:01 +02:00
Nicolas De Loof abf5f736c7
as --no-build is set, set service image to default image name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-29 17:41:53 +02:00
Pierre Roux 38a18790ed
cmd: consistent handling no-args commands (#9660)
Enforce args rejection for commands without args:
* ls
* version

Additionally, docs for `restart` are fixed.

Signed-off-by: piroux <pierre.roux01@gmail.com>
2022-07-29 09:30:11 -04:00
Ulysses Souza e9c8cfcef3 Fix environment variables priority between environment and .env
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-28 12:57:44 +02:00
Guillaume Lours e83d940a3c
add pull & build config to project before create
add pull flag to create and up documentation

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-27 11:25:53 +02:00
Nicolas De Loof 9976077e24 introduce --pull
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-07-27 11:24:00 +02:00
Ulysses Souza fc723acb3b Fix nolint issues
Reference -> https://golangci-lint.run/usage/false-positives/#nolint-directive

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00
Ulysses Souza 96cbb1cbcf Add "style" tag to gocritic
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00
Ulysses Souza d42adf6efb Add "opinionated" tag to gocritic
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00
Ulysses Souza a81f23a199 Add "diagnostic" tag to gocritic
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:06 +02:00
Ulysses Souza 2e96829607 Add gocritic to linters
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-07-13 19:33:03 +02:00
Guillaume Lours 5a1fea8272
Merge pull request #9507 from TheodosiouTh/tc/simplify-flag-conversion
TC: Use switch case to simplify flag conversion and avoid multiple if statements
2022-07-04 09:19:21 +02:00
ThedosiouTh 115ac6d529 Use switch/case instead of static map for simplicity
Signed-off-by: ThedosiouTh <thanosthd@gmail.com>
2022-06-30 18:50:24 +03:00
ThedosiouTh 8648f30351 TC: Add missing tests for argumetns
Signed-off-by: ThedosiouTh <thanosthd@gmail.com>
2022-06-30 18:50:24 +03:00
ThedosiouTh 9542bdf445 TC: fix naming
Signed-off-by: ThedosiouTh <thanosthd@gmail.com>
2022-06-30 18:50:24 +03:00
ThedosiouTh 40f0dbd971 TC: Use map to simplify flag conversion and avoid multilple if statements
Signed-off-by: ThedosiouTh <thanosthd@gmail.com>
2022-06-30 18:50:24 +03:00
Nick Sieger fd5e8b8c28
fix: panic caused by empty string argument
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-06-28 10:18:38 -05:00
Milas Bowman ab25aabfb9
Merge pull request #9311 from quite/no-ansi-be-kind
Don't use ansi even when deprecated option is requested
2022-06-16 17:15:19 -04:00
Milas Bowman 4ea3ba77b2
Merge pull request #9559 from venthur/fix_spell
fixed some spelling mistakes
2022-06-16 15:56:44 -04:00
Nick Sieger 49fb4ca25f
down: fix COMPOSE_REMOVE_ORPHANS env name and add test
Fixes #9562.

Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-06-16 08:40:40 -05:00
Bastian Venthur 8a5d555de7 fixed some spelling mistakes
that's all :)

Signed-off-by: Bastian Venthur <venthur@debian.org>
2022-06-14 21:33:36 +02:00
Laura Brehm 80b7a8d274 Only start direct dependencies of service on `compose run ...`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2022-06-14 07:32:15 +02:00
Nick Sieger b2c0d25005
ps: use DisplayablePorts from docker/cli
Fixes #9527.

Signed-off-by: Nick Sieger <nick@nicksieger.com>
2022-06-07 17:11:16 -05:00
Ulysses Souza 67c13cf821 Import dotenv file to os environment
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-05-30 17:36:41 +02:00
Nicolas De Loof 8d03e29994
attach _only_ to services declared by project applying profiles
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-20 10:36:06 +02:00
Nicolas De Loof 65b827d08f
bump compose-go to 1.2.5
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-17 17:11:32 +02:00
Jan Vitturi 84f2168f80 Fix extra space printed with `--no-log-prefix` option
Signed-off-by: Jan Vitturi <vitturi.jan@gmail.com>
2022-05-17 15:20:21 +02:00
Guillaume Lours 6d9d75406c update usage of the index flag of the cp command
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-05-10 10:50:40 +02:00
Guillaume Lours a983cf551d cp command: copy to all containers of a service as default behaviour
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-05-10 10:50:40 +02:00
Daniel Lublin 710b637e4a Don't use ansi even when deprecated option is requested
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2022-05-03 14:45:46 +02:00
Daniel Lublin d89c143c39 Clarify what default work dir is when multiple compose files
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2022-05-03 13:14:34 +02:00
Jille Timmermans 147c2d8fae down: Reject all arguments
The down command silently ignored all arguments, which might cause
confusion and/or outages if someone expects `docker-compose down
$service` to be the opposite of `docker-compose up $service`, rather
than turning down everything.

Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-05-02 15:28:30 +02:00
Ulysses Souza 69e21d89f0 Fix relative paths on envfile label
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-04-30 10:14:39 +02:00
Nicolas De Loof db698562a9 use project we just created to start services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-04-07 13:38:30 +02:00
Eric Freese d871cb98e5 Fix search/replace typo in --no-TTY documentation
Commit abbba74b27 looks to have
accidentally replaced `pseudo-tty` with `pseudo-noTty` in several
places. In other places, it looks like it replaced `pseudo-tty` with
`pseudo-TTY`, so I used the uppercased version in these places as well.

For example, running version 2.3.3, I get this output:

```
% docker-compose run --help

...

Options:
  ...
  -T, --no-TTY                Disable pseudo-noTty allocation. By default docker compose run allocates a TTY
  ...
```

Signed-off-by: Eric Freese <ericdfreese@gmail.com>
2022-04-04 19:06:03 +02:00
Ulysses Souza c7473c68ae
Merge pull request #9335 from ulyssessouza/remove-deadcode
Remove dead warning code
2022-03-31 17:04:29 +02:00
Ulysses Souza 5e63f12ae8
Merge pull request #9332 from ulyssessouza/fix-project-name
Takes COMPOSE_PROJECT_NAME into consideration on commands
2022-03-31 17:04:12 +02:00
Ulysses Souza 60363c36df Remove dead warning code
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-03-31 16:42:04 +02:00
Matthias Schoettle 6dbd6ffe11 fix typo in ssh option description
Signed-off-by: Matthias Schoettle <git@mattsch.com>
2022-03-31 10:14:13 -04:00
Ulysses Souza eee0e8bed9 Takes COMPOSE_PROJECT_NAME into consideration on commands
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-03-31 14:28:38 +02:00
Guillaume Lours ff73827a6f Add support of ssh authentications defined in compose file or via cli flags
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-31 12:47:15 +02:00
Guillaume Lours b7fd6eb7d8 pass interactive flag to ExecOptions for the RunExec command
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-26 07:23:31 +01:00
Guillaume Lours 099715fb6f update run no-TTY flag description as auto-detected by default
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-18 10:42:05 +01:00
Nicolas De Loof c843d373de restore TTY auto-detection using dockerCli.Out.IsTerminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-16 16:34:26 +01:00
Nicolas De Loof 1d4b4e3c8e use docker/cli RunExec and RunStart to handle all the interactive/tty/* terminal logic
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-16 16:34:26 +01:00
Nicolas De Loof cd8074d501
kill only need project name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-14 10:26:36 +01:00
Ulysses Souza 6ce57ea2f4 Remove DEPRECATED text, since it's just the default
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-03-11 13:01:55 +01:00
Sebastiaan van Stijn 2d32d7450c ps: un-deprecate --filter, and enhance docs
Compose currently only supports a single filter options on --filter,
for which reason the --status flag was added, which is more convenient
to use.

However, the `--filter` flag is common among various docker commands, and
it's possible that additional filters get added at some point (which may
be less "commonly" used, and not warrant a dedicated flag).

This PR removes the "deprecated" mention from the flag, to keep consistency
with other commands, but adds documentation to explain how they relate to
eachother.

Also added a short example for the `--format` flag.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-10 20:39:19 +01:00
Guillaume Lours 7036cda306
Merge pull request #9198 from ndeloof/dockerCli_stdout
composeService to use dockerCli's In/Out/Err streams
2022-03-09 14:36:07 +01:00
Nicolas De Loof 158b5ff6a3 build full compose model from resources, then filter by services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-09 11:29:30 +01:00
Guillaume Lours ce944520ff
Merge pull request #9247 from ndeloof/plain
use plain text progress when ansi=never is set
2022-03-08 16:55:55 +01:00
Nicolas De Loof 57e8e8ef29
use plain text progress when ansi=never is set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-08 15:05:37 +01:00
Nicolas De Loof 2282159922
map --interactive to StdinOpen
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-08 10:17:17 +01:00
Victor Timofei 9054f6a18b Fix json format for version command
Signed-off-by: Victor Timofei <victor@vtimothy.com>
2022-03-08 09:40:25 +01:00
Nicolas De Loof dbe7de50a7 don't try to start dependencies when there are none
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-07 08:25:05 +01:00
PIG208 bcaa908f74 Support COMPOSE_IGNORE_ORPHANS for compose run
This revives #7020 and resolves the issue mentioned in #4992.

Signed-off-by: Zixuan James Li <359101898@qq.com>
2022-03-05 22:54:16 +01:00
Guillaume Lours c64b044b7e
Merge pull request #9229 from ulyssessouza/add-ti-run-exec
Add -i and -t to run and exec
2022-03-04 17:33:09 +01:00
Ulysses Souza 67b4669f9b Add function to convert strings to bool
Typically used on boolean environment variable values

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-03-04 16:42:37 +01:00
Ulysses Souza 61735c0012 Add -i and -t to run and exec
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-03-04 14:27:06 +01:00
Nicolas De Loof f86f252a66 composeService to use dockerCli's In/Out/Err streams
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-03-03 16:34:57 +01:00
Mehrad Dadar 5885a250bc
Merge branch 'docker:v2' into issue#9147 2022-02-24 18:03:05 +03:30
Nicolas De Loof aa864fde20
COMPOSE_REMOVE_ORPHANS can be set to always apply --remove-orphans
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-02-23 14:04:12 +01:00
Mehrad Dadar 7e7262bc77
Merge branch 'docker:v2' into issue#9147 2022-02-22 05:08:29 +03:30
Nicolas De Loof 416498441c declare `--volume` as an alias for `--volumes`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-02-18 17:40:47 +01:00
Vedant Koditkar fb3f9e270f Add compose file path to ls command
docker compose ls will not include config files section in result

Signed-off-by: Vedant Koditkar <vedant.koditkar@outlook.com>
2022-02-18 16:37:35 +01:00
Nicolas De Loof fb9310caf2 use CustomLabels for composeV2 metadata and not impact service hash
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-02-17 09:05:54 +01:00
Mehrad Dadar 65ed8cf4c2 Implemented #9147
Signed-off-by: Mehrad Dadar <mehrad.dadar@gmail.com>
2022-02-05 10:27:52 +03:30
Guillaume Rose 99cd90a4b2 Return only numbers in short version
Python version of docker compose removes the v prefix in the version.

```
$ docker-compose version --short
1.25.5
```

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2022-01-17 07:30:27 +01:00
Ulysses Souza a279c3a934 Discard env_file section on convert/config
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2022-01-15 11:45:08 +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 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
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
notok 3bbcc3d4d0 Fix lint error
Signed-off-by: notok <noto.kazufumi@gmail.com>
2021-12-08 18:42:00 +09: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
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
Nicolas De Loof d00eacbba0 don't normalize compose model in compatibility mode
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-22 21:02:44 +01:00
Nicolas De Loof 3261b60fd1 --quiet implies --progress=quiet
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-17 13:08:30 +01:00
Nicolas De Loof cb425a23c0 check supported --progress flag values
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-17 13:08:30 +01:00
Ulysses Souza 865b82da6a Remove unused flag
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-12 14:56:27 +01:00
Ulysses Souza a79346b978 Support inherited environment vars on exec
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-05 20:51:36 +01:00
Nicolas De Loof 72e4519cbf introduce up --wait condition
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-11-03 18:22:29 +01:00
Nicolas De Loof c4cfaeb12a
COMPOSE_COMPATIBILITY can be set by .env file
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-10-28 10:10:43 +02:00
Ulysses Souza 2530bd981a Fix project settings' options order
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-10-22 14:59:25 +02:00
Ulysses Souza 94379769e3 Make service>build>dockerfile a simple filename
- It makes it keep a simple filename instead of an absolute path

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-10-20 10:24:08 +02:00
Debdut Chakraborty 55a214a45e Fix -t flag for compose up command
Signed-off-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
2021-10-13 09:11:44 +05:30
Debdut Chakraborty 35b4d1de28 Fix checking -t flag
Signed-off-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
2021-10-13 08:59:16 +05:30
Shikachuu fc8a433cee Remove the hidden flag from version, added --version and -v flags to root command.
Signed-off-by: Shikachuu <zcmate@gmail.com>
2021-10-04 18:15:43 +02:00
Mathieu Champlon 98fe57baac Make command descriptions consistent
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-10-04 15:10:37 +02:00
Ulysses Souza 435387c72c
Merge pull request #8712 from ndeloof/ps-status-services
allow combination of --status and --services
2021-09-30 12:51:26 +02:00
Ulysses Souza ecee21b5e5
Merge pull request #8708 from ulyssessouza/standalone
Add standalone capacility
2021-09-30 10:23:02 +02:00
Nicolas De Loof 7c0e865960
allow combination of --status and --services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-30 09:59:11 +02:00
Nicolas De Loof 1faa76ee4e
use compose-switch Convert
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-30 09:15:56 +02:00
Ulysses Souza 17354fcc99 Add standalone capacility
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-30 02:16:55 +02:00
Nicolas De Loof 7f31fe678f
make --status a multi-flag
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-29 17:17:28 +02:00
Iaroslav Sheptykin 3f37003340 Deprecate --filter. List values for --status
Signed-off-by: Iaroslav Sheptykin <i.sheptykin@neusta.de>
2021-09-27 17:47:52 +02:00
Nicolas De Loof 07b5512a68 `run` must attach to stdin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-27 17:42:37 +02:00
Lorena Rangel 1ec997270d
Merge pull request #8668 from ndeloof/ignore_orphans
add support for COMPOSE_IGNORE_ORPHANS
2021-09-27 16:40:25 +02:00
Nicolas De Loof bc25259f07
add support for COMPOSE_IGNORE_ORPHANS
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-24 08:24:48 +02:00
Nicolas De Loof 244834ff12 compose exec doesn't need project
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-23 17:09:37 +02:00
Nicolas De Loof 97a0efd7c3 group ports to render ranges as ... ranges
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-23 15:35:07 +02:00
Nicolas De Loof e39ea13002 fix support for `compose run --label`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-23 14:52:04 +02:00
Nicolas De Loof 99e75639d6 define compose container names with a valid hostname
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-22 19:06:34 +02:00
Ulysses Souza 2a1e989f3e Stop only the service ran by it's up command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-20 16:45:40 +02:00
Ulysses Souza 480a255a0e
Merge pull request #8620 from ndeloof/scale_0
get scale from deploy.replicas. Require scale normalization
2021-09-20 16:27:11 +02:00
Ulysses Souza 3bf555cbd6 Fix lint make target
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-20 13:09:11 +02:00
Nicolas De Loof 3324429320 introduce --compatibility (noop) for backward ... compatibility
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-20 11:43:23 +02:00
aviau 21d3b19e57 compose/run: don't waitDependencies if NoDeps
Signed-off-by: aviau <alexandre@alexandreviau.net>
2021-09-16 11:09:44 +02:00
Nicolas De Loof a2947457b9
get scale from deploy.replicas. Require scale normalization
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-15 14:02:01 +02:00
Ulysses Souza 4441ff5b21
Merge pull request #8604 from ndeloof/convert_output
introduce `--output` option to `config` command
2021-09-14 08:03:03 +02:00
Nicolas De Loof caf157969e
introduce `--output` option to `config` command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-10 15:10:02 +02:00
Nicolas De Loof cc47e5385b
use a sync.Map to avoid concurrency issue accessing log presenters
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-10 12:54:24 +02:00
Nicolas De Loof a0bff8be96
redundant break statement
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-09 18:47:18 +02:00
Nicolas De Loof e44aacfbc1 fix run --volume flag (mistakely renamed --volumes)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-09 15:42:17 +02:00
Nicolas De Loof e8666b02f3 introduce up --attach
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-09 08:29:07 +02:00
Nicolas De Loof 2ceb176500 support --entrypoint="" as override
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-08 10:39:08 +02:00
Nicolas De Loof 010776f6db introduce --resolve-paths and restore compose v1 behavior
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-06 17:05:13 +02:00
Nicolas De Loof 5b30accf35
Change URLs to reflect new project home
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-02 09:06:52 +02:00
Nicolas De Loof e1267cddfd don't exit with err=1 when no container listed
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-01 15:32:43 +02:00
Nicolas De Loof 1ae9b3cb5d
move compose-cli code into docker/compose/v2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 19:09:19 +02:00
Nicolas De Loof c944c970ab
use nicer imports
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 16:58:19 +02:00
Nicolas De Loof fcb91096b8
remove all references to cli from compose.v2 cmd package
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 15:41:20 +02:00
Nicolas De Loof 19cbbdd79e
only build requested services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-26 15:55:19 +02:00
Nicolas De Loof 8d476eee4c
apply filter before formatter
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-06 15:31:50 +02:00
Hironao OTSUBO 1a0efdd413 Fix issue `docker compose rm -s` not removing containers
Signed-off-by: Hironao OTSUBO <motemen@gmail.com>
2021-07-29 23:37:48 +09:00
Nicolas De loof 3d83989f5d
Merge pull request #1773 from ulyssessouza/completion 2021-07-26 08:23:13 +02:00
Milas Bowman 1e35245390 Print services in dependency order
Currently, `compose config --services` outputs the services in
a random/non-deterministic order.

In Compose v1, this was implicitly topologically sorted because
the project services were pre-sorted. With `compose-go`, the
services are unordered, and the `WithServices()` helper can be
used to iterate in dependency order.

Signed-off-by: Milas Bowman <milasb@gmail.com>
2021-07-21 11:11:38 -04:00
Ulysses Souza c28aec2308 Filter completions by toComplete variable
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 72b66fb5c1 Add 'no completion' or 'service' completion
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 37961c51ca Add completion to "compose ps"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Ulysses Souza 3174f49dc2 Add completion to shells
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 14:33:37 -03:00
Lorena Rangel 8fd04195be
Merge pull request #1914 from ndeloof/run_volumes
run -v should not remove configured volumes
2021-07-12 16:02:21 +02:00
Nicolas De Loof e6f7c64eb8
run -v should not remove configured volumes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 12:40:37 +02:00
Nicolas De Loof bf0b75cee0
report error on `ps` when no container found for service(s)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 10:42:31 +02:00
Sebastiaan van Stijn a0db32043e
Do not strip "v" prefix from version when printing
I noticed this when building the binary; `internal.Version` is set to `v2.0.0-beta.4`,
to match the tag.

```bash
GIT_TAG=v2.0.0-beta.4
make COMPOSE_BINARY=bin/docker-compose -f builder.Makefile compose-plugin \
    GOOS=linux \
    GOARCH=amd64 \
    CGO_ENABLED=0 \
    go build \
        -trimpath \
        -ldflags="-s -w -X github.com/docker/compose-cli/internal.Version=v2.0.0-beta.4" \
        -o bin/docker-compose \
        ./cmd
```

However, the binary has the `v` prefix stripped (which caused a check to fail
when packaging):

```bash
/root/rpmbuild/BUILDROOT/docker-compose-plugin-2.0.0.beta.4-0.fc34.x86_64/usr/libexec/docker/cli-plugins/docker-compose docker-cli-plugin-metadata
++ awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }'
+ ver=2.0.0-beta.4
+ test 2.0.0-beta.4 = v2.0.0-beta.4
FAIL: docker-compose version (2.0.0-beta.4) did not match
```

This also looks inconsistent with other binaries and plugins we ship:

```bash
docker info --format '{{json .ClientInfo.Plugins}}' | jq .
[
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "v0.5.1-docker",
    "ShortDescription": "Build with BuildKit",
    "Name": "buildx",
    "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
  },
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "2.0.0-beta.4",
    "ShortDescription": "Docker Compose",
    "Name": "compose",
    "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
  },
  {
    "SchemaVersion": "0.1.0",
    "Vendor": "Docker Inc.",
    "Version": "v0.8.0",
    "ShortDescription": "Docker Scan",
    "Name": "scan",
    "Path": "/usr/libexec/docker/cli-plugins/docker-scan"
  }
]
```

Perhaps there was a specific reason for this, but thought I'd open this PR for
discussion (if the v-prefix should not be there, perhaps we should isntead strip
it when setting the version).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-03 15:53:21 +02:00
Nicolas De Loof 96e1e041d6
distinguish stdout and stderr
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 10:53:11 +02:00
Nicolas De Loof b5827d4a86
pass --force and --volumes options to backend
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-25 13:46:34 +02:00
Nicolas De Loof d8d739307e test
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-24 10:11:01 +02:00
Nicolas De Loof 05b510a447
compose ps to include container command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 16:09:47 +02:00
Nicolas De loof 13b57023d7
Merge pull request #1823 from ndeloof/filter_status
implement ps --status=xx filter
2021-06-22 13:32:57 +02:00
Nicolas De Loof 46a65b8c77
add --verbose option for compatibility
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 11:49:54 +02:00
Nicolas De Loof 3e4f030d2d
implement ps --status=xx filter
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-21 11:16:09 +02:00
Afshin Paydar df6d709aa5 Merge branch 'main' of github.com:docker/compose-cli into docker_compose_logs_since_option 2021-06-16 08:57:02 +08:00
Nicolas De Loof 49e7f2d45d Move compose v2 implementation under pkg/compose with dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00
Nicolas De Loof e2ea24ceb7 move compose-plugin commands under /cmd
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00
Djordje Lukic 3bb4fe163c Add `docker context create` command
This creates a context with a name and a type
2020-04-26 19:42:20 +02:00
Djordje Lukic 244adb77a4
Merge pull request #20 from chris-crone/copyright
Update copyright date
2020-04-24 18:06:14 +02:00
Christopher Crone d166ad82f9 Update copyright date
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-04-24 14:39:49 +02:00
Ulysses Souza b44547c71f Refactor NewContext
This renames NewContext to NewSigContext and
moves it to ./util/util.go avoiding the servers
to import "github.com/docker/api/client"

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-04-24 11:50:30 +02:00
Djordje Lukic 29a838ddf5
Merge pull request #15 from glours/find_existing_docker_binary
Use docker binary find in path to fallback to Moby CLI
2020-04-23 11:32:13 +02:00
Guillaume Lours 8db55e8c5c Use v2 of urfave/cli
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-23 09:43:53 +02:00
Guillaume Lours 8af8924a58 Use docker binary find in path to fallback to Moby CLI
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-22 23:47:04 +02:00
Djordje Lukic 6bfeda054b Go mods initialized, protos without gogo 2020-04-21 15:07:41 +02:00
Djordje Lukic 4b2c8ae9cf Call original docker on moby context
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-20 21:16:03 +02:00
Guillaume Lours f5aa9638af Add default shellout to engine if no context specified
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-20 17:16:37 +02:00
Guillaume Lours a8403241e4 Add default shellout to engine if no context specified
Improve CLI documentation

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-20 16:22:15 +02:00
Nicolas De Loof 3dac4df803 Implement context loading
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-04-20 16:22:15 +02:00
Djordje Lukic dfa8e03860 Configure client connection backoff
For faster startup times (from 2s to ~130ms)
2020-04-17 14:37:54 +02:00
Guillaume Tardif 91951eb03a Rename context to example to make it more explicit, context will be a local command managing contexts (similar to docker-cli context command, adapted here for more generic purpose) 2020-04-07 21:36:25 +02:00
Michael Crosby 37591c714b Add base cli and connection logic
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-04-06 11:54:01 -04:00