uname -a
ubuntu:
确认是否有旧版本的docker存在
sudo apt-get remove docker docker-engine docker.io
- 安装docker-ce:
sudo apt-get install -y docker-ce
(
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
)
- 查看docker服务是否启动:
$ systemctl status docker
经典的hello world
sudo docker run hello-world
https://blog.csdn.net/jinking01/article/details/82490688
安装docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
再赋予该文件可执行权限
sudo chmod +x /usr/local/bin/docker-compose
最后检查docker-compose是否安装成功
docker-compose --version