docker 安装相关说明及资料

docker install

update date: 2021-12-09

docker install
doc url: https://docs.docker.com/engine/install/centos/

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

docker-compose install 1.29.2
doc url:https://docs.docker.com/compose/install/

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Compose V2 install
doc url: https://docs.docker.com/compose/cli-command/

mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version

To install Docker Compose for all users on your system, replace ~/.docker/cli-plugins with /usr/local/lib/docker/cli-plugins

mkdir -p /usr/local/lib/docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
docker compose version

Compose cli install
latest docker version no need to install
doc url: https://docs.docker.com/compose/cli-command/

curl -fL https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh

Compose Switch install
wrong doc url: https://docs.docker.com/compose/cli-command/
doc url: https://github.com/docker/compose-switch/

curl -fL https://raw.githubusercontent.com/docker/compose-switch/master/install_on_linux.sh | sh
update-alternatives --display docker-compose
上一篇
下一篇