Basic operations of Docker containers

The environment used in this article is Mac OS 10.11.6, Docker 1.12.0.

 

1. Start the container

 

 

-i means open the standard input of the container, -t means return a tty terminal. Use this command to get a shell terminal for a container.

 

2. View currently running containers

 

 

3. Stop the container

 

 

After stopping the container with the docker stop command, you can also restart the container with the docker start command.

 

Fourth, delete the container

 

 

After a container is deleted, it cannot be restarted with the docker start command.

 

5. Export the container

 

 

6. Commit from an existing container to a new image

 

Please refer to: Basic operations of Docker images

Guess you like

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