Ubuntu 18.04 LTS docker环境搭建

Ubuntu 18.04 LTS docker环境搭建

方法一:一键搭建脚本

官方脚本:

curl -sSL https://get.docker.com/ | sh

阿里云脚本:

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

方法二:apt搭建

sudo apt update
sudo apt remove docker docker-engine docker.io
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
sudo systemctl status docker

sudo usermod -aG docker $(whoami)
sudo systemctl enable docker
sudo systemctl start docker
docker run hello-world

参考
https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04

posted @ 2021-01-01 14:53  与MPI做斗争  阅读(277)  评论(0编辑  收藏  举报