一键安装(国内aliyun加速)
1
| curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
|
默认一键安装
1
| curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh
|
docker-compose 安装
1 2 3 4
| sudo curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose docker-compose --version
|
ghproxy 加速站经常失效,能直连时去掉前缀即可:
1
| sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
1
| git config --global https.proxy https://192.168.2.6:7890
|