fix(cli-command): handle $DOCKER_CONFIG env var

This commit is contained in:
Tobias Sette 2022-02-16 14:34:31 -03:00 committed by GitHub
parent 7d070ddcac
commit 5e58b08078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -78,8 +78,9 @@ from the [project release page](https://github.com/docker/compose/releases){:tar
1. Run the following command to download the current stable release of Docker Compose:
```console
$ mkdir -p ~/.docker/cli-plugins/
$ curl -SL https://github.com/docker/compose/releases/download/v{{site.compose_v2_version}}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
$ mkdir -p $DOCKER_CONFIG/cli-plugins
$ curl -SL https://github.com/docker/compose/releases/download/v{{site.compose_v2_version}}/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
```
This command installs Compose V2 for the active user under `$HOME` directory. To install Docker Compose for all users on your system, replace `~/.docker/cli-plugins` with `/usr/local/lib/docker/cli-plugins`.
@ -87,7 +88,7 @@ from the [project release page](https://github.com/docker/compose/releases){:tar
2. Apply executable permissions to the binary:
```console
$ chmod +x ~/.docker/cli-plugins/docker-compose
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
```
3. Test your installation