Install the latest docker on Ubuntu16.04

1. add the GPG key for the official docker repo

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

2. Add the docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

3. update the package database with docker pakcages

sudo apt-get udpate

4. make sure you are about to install from the docker repo instead of the default ubuntu 16.04 repo

apt-cache policy docker-ce

5. install docker

sudo apt-get install -y docker-ce

6. start docker on boot

sudo systemctl status docker

7. Test docker

docker run hello-world

the output, which should include the following, should indicate that docker in working correctly.

Hello from Docker.This message shows that your installation appears to be working correctly....

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容