Docker learning 02_ basic operations

Download image of a Centos 7.5: docker pull

View the existing list of mirrors: docker images

 Use docker run command to run an application in the container:

Use -i -t parameters to run an interactive container:

-t: Specifies a pseudo-terminal or terminals in the new container.

-i: allows you to input standard (STDIN) in the container to interact.

 At this point we have entered a container centos 7.5 system, linux command executable in this container, its hostname and host significantly different. Enter exit to exit the container.

 

Create a process to run container:

 docker ps View a list of running container: container ID, Names generated automatically identifies the container object.

docker logs container ID (or Name) view output operation in the container:

 docker stop the container ID (or Name) stop the container.

 Docker more client usage can be entered directly docker to see:

docker COMMAND --help to view a specific use to help run the command:

 

Guess you like

Origin www.cnblogs.com/xjcn/p/11491662.html