codetalks-new / notes

About me
4 stars 0 forks source link

Ubuntu 18.04 Docker 安装 #15

Open codetalks-new opened 5 years ago

codetalks-new commented 5 years ago

参考: 在 Ubuntu 下安装Docker

  1. 安装脚本
    apt-get update &&  \
    apt-get install -y apt-transport-https ca-certificates curl software-properties-common && \
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
    apt-get update && apt-get install -y docker-ce&& \
    usermod -aG docker $USER && \
   echo '{ "registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com"]}' > /etc/docker/daemon.json && \
    systemctl restart docker
  1. 配置国内镜像, 在上面脚本一本写上了.
codetalks-new commented 5 years ago

安装 docker-compose

参考 Install Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose