@gabe
2019-11-20T11:01:40.000000Z
字数 1052
阅读 1418
docker
使用阿里云的镜像安装
apt-get update
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64]
http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get -y update
apt-get -y install docker-ce
docker run -dt --name ss -p 8899:8899 mritd/shadowsocks -s "-s 0.0.0.0 -p 8899 -m aes-256-cfb -k intv666"
免sudo
sudo gpasswd -a $USER docker
docker加速
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://j194kkje.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
安装docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
或者去https://github.com/docker/compose下载对应的版本。
sudo chmod +x /usr/local/bin/docker-compose
参考
- https://docs.docker.com/compose/install/#install-compose
- https://help.aliyun.com/document_detail/60742.html
- 过时的配置 https://lug.ustc.edu.cn/wiki/mirrors/help/docker