docker 安装 docker compose

8/29/2021 linuxdocker

# Finds the latest version

compose_version=$(curl -fsSL -o /dev/null -w "%{url_effective}" https://github.com/docker/compose/releases/latest | xargs basename)
1

# Downloads the binary to the plugins folder

curl -fL --create-dirs -o /usr/local/bin/docker-compose \
    "https://github.com/docker/compose/releases/download/${compose_version}/docker-compose-linux-$(uname -m)"
1
2

# Assigns execution permission to it

chmod +x /usr/local/bin/docker-compose
1

# Test the installation

docker-compose --version
1
Last Updated: 12/26/2022, 11:54:10 AM