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