[关闭]
@gabe 2019-11-20T11:01:40.000000Z 字数 1052 阅读 1426

docker docker-compose安装

docker


使用阿里云的镜像安装

  1. apt-get update
  2. apt-get -y install apt-transport-https ca-certificates curl software-properties-common
  3. curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
  4. add-apt-repository "deb [arch=amd64]
  5. http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
  6. apt-get -y update
  7. apt-get -y install docker-ce
  8. 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

  1. sudo gpasswd -a $USER docker

docker加速

  1. sudo mkdir -p /etc/docker
  2. sudo tee /etc/docker/daemon.json <<-'EOF'
  3. {
  4. "registry-mirrors": ["https://j194kkje.mirror.aliyuncs.com"]
  5. }
  6. EOF
  7. sudo systemctl daemon-reload
  8. sudo systemctl restart docker

安装docker-compose

  1. 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下载对应的版本。

  1. 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

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注