Docker30:Compose V2安装

Docker30:Compose V2安装

Created
Apr 14, 2022 03:05 AM
Last Edited
Last updated April 14, 2022
Tags

官网方式

Install on Linux🔗

You can install Compose V2 by downloading the appropriate binary for your system from the project release page and copying it into $HOME/.docker/cli-plugins as docker-compose.
  1. Run the following command to download the current stable release of Docker Compose:
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins curl -SL https://github.com/docker/compose/releases/download/v2.2.3/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.
  1. Apply executable permissions to the binary:
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
  1. Test your installation
docker compose version
notion image