Linux下安装Docker+Docker-compose

每次都需要查脚本,这篇文章主要是记录一下。

  1. 脚本安装docker
curl -sSL https://get.docker.com/ | sh

2. 赋予权限

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

注:如果不赋予权限,每次使用docker必须通过sudo执行。

3. 脚本安装docker-compose

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