AWS EC2安装docker时的问题

在AWS EC2的实例(Ubuntu)里面安装docker时,使用一般的安装步骤docker

:~$ sudo apt-get update


:~$ sudo apt-get install docker

安装完成以后,查看docker版本时,提示docker命令不存在ubuntu

:~$ sudo docker -v
sudo: docker: command not found

 

在stack overflow上看人说,使用apt-get 安装的是一个GUI应用程序,而不是咱们要使用的开发工具。经过运行以下脚原本安装dockercurl

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

在安装完成后,要注意下面的提示:工具

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

 

而后更新docker run命令开发工具

sudo apt-get update && apt-get upgrade

 

最后,查看docker版本:ui

:~$ sudo docker --version
Docker version 1.13.1, build 092cba3

说明docker已经安装成功url

 

替换docker,使用docker.iospa

sudo apt-get install docker.io

 

参考:code

ubuntu 14.04 - docker command not found even though installed with apt-get - Stack Overflow https://stackoverflow.com/questions/30379381/docker-command-not-found-even-though-installed-with-apt-getorm

相关文章
相关标签/搜索