Ubuntu18.04 安装 docker

Ubuntu18.04 安装 docker

1. 安装docker

参考链接: https://docs.docker.com/install/linux/docker-ce/ubuntu/
1). sudo apt-get update
2). sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
3). curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4). sudo apt-key fingerprint 0EBFCD88
5). sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”
6). sudo apt-get update
7). sudo apt-get install docker-ce docker-ce-cli containerd.io

2. 创建docker组并添加用户到docker组

1). sudo groupadd docker
2). sudo usermod -aG docker $USER

3. 用docker运行hello-world

1). docker run hello-world

你可能感兴趣的:(docker,docker,ubuntu,linux)