Skip to content

Instantly share code, notes, and snippets.

@holmesconan
Created September 20, 2018 11:01
Show Gist options
  • Save holmesconan/aa4cc96497dd1f8631ab0fd715c69bf8 to your computer and use it in GitHub Desktop.
Save holmesconan/aa4cc96497dd1f8631ab0fd715c69bf8 to your computer and use it in GitHub Desktop.
Docker install script
#!/bin/sh
# 从阿里云的镜像安装 Docker CE
# 参考:https://help.aliyun.com/document_detail/60742.html
# step 1: 安装必要的一些系统工具
apt-get update
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
# Step 3: 写入软件源信息
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Step 4: 更新并安装Docker-CE
apt-get -y update
apt-get -y install docker-ce
wget -O /tmp/docker-compose -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-Linux-x86_64
chmod +x /tmp/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment