[Learning record] Basic operation instruction Docker

This reference to " docker container and the container cloud" "This first docker book"

Part of the instruction will not be explained in detail later with the use of a multi slowly improving.

 

1.docker info

docker info needed docker daemon process started to run properly, and therefore can be used to determine docker whether the daemon is started.

 

2.docker run [options] image [command] [arg...]

Based on image mirror to create a container, and is controlled by specifying options

Common options:

docker run -i -t --name mycontainer ubuntu:latest /bin/bash

-i : using interactive mode, keeping open the input stream

-t : using a pseudo-terminal, using a pseudo-terminal interact in the container

--name : set a name for the container, or the name of the vessel system is randomly generated.

Ubuntu: Latest : image name

/ bin / bash : tell the container what instructions after running start

 

3.docker ps -a

List all containers

 

4.docker start -i container

Start a container, the container can ID or name specified container vessel

Similarly there docker stop / restart

 

5.docker pull NAME

Pulling the mirror from the warehouse

 

6.docker push NAME

Upload image to warehouse

 

7.docker images

Mirror on the host list

 

8.docker rm container         docker rmi image

Delete container or remove a mirror

 

9.docker attach contain

 

 

Completely in sync

 

10.docker inspect  CONTAINER|IMAGE

View Details mirroring or container

 

11.docker commit

Tell a container made into a new image

 

12.docker events

Real-Time continuous printing system time

 

13.docker history IMAGE

Print version history of the specified mirror

 

14.docker logs CONTAINER

Print the specified container internal processes running log

 

15.docker top CONTAINER

Look inside the container process by pid can find maps of the process on the host

On the host ps seen pid container interior ps see pid is not the same, but the mapping relationship configured

 

16.docker stats

Display container statistics are a bit like the Task Manager

 

 

 

Guess you like

Origin www.cnblogs.com/trickofjoker/p/11619810.html