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

733 Commits

Author SHA1 Message Date
Guillaume Lours
1a01d2f198 update gotest.tools to v3.3.0 which support golang 1.18
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-25 12:20:42 +02:00
CrazyMax
1dce98712a Go 1.18
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-24 00:49:08 +02:00
Piotr Stankiewicz
f922ff963d Use Docker CLI socket from the User's home directory
We should not rely on having a global path for the Docker CLI socket. On
macOS this forces Docker Desktop to access directories which require
raised privileges. Whereas on Linux we do not create sockets in that
location at all, currently. So look for the Docker CLI socket in the
User's home directory.

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2022-07-22 11:31:22 +02:00
CrazyMax
8092874d41 metrics: fix unexpected usage output shown on cli
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-15 03:50:45 +02:00
Guillaume Tardif
f96ef1970c Add extension commands in command metrics
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2022-04-13 23:01:33 +02:00
Alex Goodman
29cbfa0485 add SBOM management command to metrics
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2022-03-23 10:45:42 -04:00
CrazyMax
535fb93280 add build metrics
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-22 19:36:19 +01:00
CrazyMax
a4ae60a39d recover missing commands for backward compatibility
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-16 12:20:31 +01:00
CrazyMax
6fd97089b8 sort commands
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-16 12:20:30 +01:00
CrazyMax
d3f55aec6d update commands
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-16 12:20:30 +01:00
Mathieu Champlon
48ad1486ac Revert "signals"
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-11-04 17:14:28 +01:00
Ulysses Souza
5aa293cc04 Fix plugin command delegation
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-11-03 15:22:52 +01:00
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