1
0
mirror of https://github.com/docker/compose-cli.git synced 2026-10-25 06:19:18 +03:00

721 Commits

Author SHA1 Message Date
Lorena Rangel
3ff346838a point to correct backend when switching context
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-10-18 14:15:04 +02:00
Lorena Rangel
7829bd2459 bump protoc and update .proto files
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-10-06 15:43:01 +02:00
Mathieu Champlon
8b76602054 Merge pull request #1879 from ndeloof/signals
signals
2021-09-21 12:09:52 +02:00
Ulysses Souza
81c53672d5 Linter fixes
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-18 15:50:25 +02:00
Ulysses Souza
25b335924c Store context type in the context for reusing
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-17 19:26:24 +02:00
Ulysses Souza
fa7e0632ba Add checks for unsupported flags
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-17 10:19:02 +02:00
Nicolas De Loof
07f6f804a9 use docker/compose/v2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-17 10:19:02 +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
Mathieu Champlon
f09336e519 Merge pull request #1953 from amineck/no_pass
Post-login msg: Ignore if password is empty
2021-07-28 07:46:17 +02:00
Lorena Rangel
657025eb94 Merge pull request #1952 from amineck/pat_suggest_url
Update personal access token url
2021-07-27 16:11:41 +02:00
Ulysses Souza
230b9b592e Merge pull request #1942 from ndeloof/heml_oras
stop using helm fork for oras dependency conflict
2021-07-26 14:50:56 -07:00
Amine Chouki
3f59e9a3ad Ignore if password is empty
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-26 10:37:58 -04:00
Amine Chouki
33454c6ebd Update personal access token url
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-26 10:33:57 -04:00
Nicolas De loof
3d83989f5d Merge pull request #1773 from ulyssessouza/completion 2021-07-26 08:23:13 +02:00
Amine Chouki
5c427ef702 Move pat_suggest.go into cli package
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-23 10:55:31 -04:00
Nicolas De Loof
c3f990f0a2 replace deprecated method after transitive dependency update
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 10:37:24 +02:00
Amine Chouki
906e1b4305 Add a post-login message to promote personal access tokens
Signed-off-by: Amine Chouki <amine.chouki@docker.com>
2021-07-22 16:58:00 -04:00
Nicolas De Loof
9215d68428 signals
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-13 10:02:48 +02: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
Michael Irwin
08c2c44beb Fix help text when for context create and kube backend
Signed-off-by: Michael Irwin <mikesir87@gmail.com>
2021-07-06 15:46:00 -04: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
Mathieu Champlon
313de1de4a Look for docker cli next to the current executable
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-06-22 10:39:04 +02: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
Nicolas De Loof
d90495e1cd move compose API into pkg/api
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00
Nicolas De loof
79573e1acc Merge pull request #1767 from ndeloof/exec_no_tty
automatically disable TTY if shell isn't a terminal
2021-06-11 09:44:14 +02:00
Nicolas De Loof
679d24a178 ignore image we can't build when forcing PullPolicyBuild
close https://github.com/docker/compose-cli/issues/1776

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-10 16:21:32 +02:00
Nicolas De Loof
b1d2c18dfc give -T a long name, otherwise help is weird
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-10 09:58:47 +02:00
Nicolas De Loof
1d38001164 automatically disable TTY if shell isn't a terminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-10 09:58:47 +02:00
Nicolas De Loof
1ad964603a config --profiles to list all defined profiles
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-09 12:44:38 +02:00
Nicolas De loof
b0a66356e0 Merge pull request #1757 from ndeloof/docs
update reference docs
2021-06-09 07:31:22 +02:00
Nicolas De Loof
abbba74b27 update reference docs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-08 09:39:49 +02:00
Nicolas De Loof
c135bd1d7c move up logic from CLI into local backend
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-07 20:20:31 +02:00
Nicolas De loof
b86ff6b18f Merge pull request #1747 from ndeloof/down_progress 2021-06-07 15:57:38 +02:00
Nicolas De Loof
dec9169198 move progress to backend on "down"
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-07 15:41:59 +02:00
Sebastiaan van Stijn
b4c8a9dc5f mobycli: ignore SIGURG on Linux and Darwin
Equivalent of fff164c22e
and cedaf44ea2

In go1.14+, SIGURG is used by the runtime to handle preemtable system calls.
In practice this signal is caught *frequently*.

For reference:

https://go.googlesource.com/proposal/+/master/design/24543-non-cooperative-preemption.md
golang/go#37942

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-07 12:44:55 +02:00
Nicolas De Loof
924d7925d6 showcase simpler command design by using API options as cobra flags target
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-03 17:58:54 +02:00
Nicolas De Loof
82f35d1bac Move progress writter into backend(s)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-03 14:16:22 +02:00
Nicolas De loof
3ec33face4 Merge pull request #1730 from ndeloof/progress_cleanup
code cleanup: most progress.Run don't return a value
2021-06-02 11:22:34 +02:00
Nicolas De Loof
a2ff974ac6 remove obsolete compose grpc service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-01 15:33:55 +02:00
Nicolas De Loof
9b0bc6fee1 code cleanup: most progress.Run don't return a value
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-01 15:18:03 +02:00
Nicolas De loof
2315a1dad7 Merge pull request #1707 from docker/up_follow 2021-05-31 10:54:40 +02:00
Nicolas De Loof
3aaec6a554 split compose-cli "docker" and composeV2 cli-plugin release processes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-05-27 12:46:39 +02:00
Nicolas De Loof
c16834cba6 attach to containers added by "scale"
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-05-25 22:59:57 +02:00
Nicolas De loof
93a3392d3a Merge pull request #1696 from ndeloof/compose_file_env
support compose file set by COMPOSE_FILE env var
2021-05-21 10:22:57 +02:00
Nicolas De loof
ed11511d29 Merge pull request #1691 from docker/pre_run
validate and pre-process flags in PreRun
2021-05-20 18:50:50 +02:00
Nicolas De Loof
8b9ed85928 validate and pre-process flags in PreRun
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-05-20 18:35:13 +02:00
Nicolas De loof
d70b50bc3b Merge pull request #1689 from chris-crone/bump-linter 2021-05-20 18:33:48 +02:00