Last active
December 25, 2017 03:54
-
-
Save seancheung/2115554d501bb864053754d6428b0282 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# step 1: 安装必要的一些系统工具 | |
sudo apt-get update | |
sudo 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 | sudo apt-key add - | |
# Step 3: 写入软件源信息 | |
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | |
# Step 4: 更新并安装 Docker-CE | |
sudo apt-get -y update | |
sudo apt-get -y install docker-ce | |
# 安装指定版本的Docker-CE: | |
# Step 1: 查找Docker-CE的版本: | |
# apt-cache madison docker-ce | |
# docker-ce | 17.03.1~ce-0~ubuntu-xenial | http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages | |
# docker-ce | 17.03.0~ce-0~ubuntu-xenial | http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages | |
# Step 2: 安装指定版本的Docker-CE: (VERSION 例如上面的 17.03.1~ce-0~ubuntu-xenial) | |
# sudo apt-get -y install docker-ce=[VERSION] | |
# docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose | |
# mirror repo | |
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://470c0fad.m.daocloud.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment