Ubuntu14.04 install docker

There are many online tutorials, so record

 

Environment: ubunt14.04; 64-bit

 

Because the version is high enough, there is no need to update the kernel

 

According to the steps of online inquiry

 

1. Installation

 

sudo apt-get install apt-transport-https
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo bash -c "echo deb https://get.Docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

 

2. Test whether the installation is successful

 

sudo docker

 

#There will be some parameter explanations, the last sentence 'Run 'docker COMMAND --help' for more information on a command.'

 

3. Download the official ubuntu image

 

sudo docker pull ubuntu

 

#Online introduction may fail to download because it is sometimes blocked. But I succeeded this time

 

4,hello world

 

sudo docker run ubuntu /bin/echo hello world

 

#print hello world

 

5, Step 4 is the ephemeral way in the docker command run mode.

 

After the command finishes running, the container container terminates, but does not disappear

 

$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                     PORTS               NAMES
182bd7dbadef        ubuntu:latest       "/bin/echo hello wor   3 minutes ago       Exited (0) 3 minutes ago                       dreamy_perlman      
1b2c0cf1084e        ubuntu:latest       "/bin/echo hello wor   16 hours ago        Exited (0) 16 hours ago                        agitated_rosalind

 

#This is the result of my execution twice

 

Check the id command again: sudo docker start container_id, take the example just executed:

 

$ sudo docker start 182bd7dbadef
182bd7dbadef

 

 

 

View information: http://www.tuicool.com/articles/aIvYra

http://www.cnblogs.com/linjiqin/p/3625609.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326915797&siteId=291194637