mirror of https://github.com/docker/docs.git
fix(cli-command): handle $DOCKER_CONFIG env var
This commit is contained in:
parent
7d070ddcac
commit
5e58b08078
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue