Current location - Health Preservation Learning Network - Slimming men and women - Docker encyclopedia of general commands
Docker encyclopedia of general commands
1. Start the stopped container (or the command given before running). Deletes the specified container. The-force option can force the deletion of a running container. Copy files and directories between the container and the host.

2. In the interactive mode of sudodokerexec-it[ container ID]/bin/bash, use ctrl+p+q to exit the interaction and keep running, and use the exit command to exit and stop the container.

3. The specific operation is as follows: connect the docker tach[options] container to the running container, and then print the standard input, output and error flow information of the container locally. There are three option values in this command:-detach-keys,-no-stdin,-sig-proxy.

4.docker's command to delete an image is dockerrmi. If you want to delete a local image, you can use the dockerrmi (note that rm is the deletion container, rmi is the deletion image, where I stands for the image) command. Its specific syntax is as follows: dockerrmi[OPTIONS]IMAGE[IMAGE].

5. Run instructions are used to execute commands. There are two forms of this instruction: for example, we execute the update command: CMD is used in a way similar to RUN, but there can only be one CMD instruction in the Dockerfile file. If there are more than one, only the last one will take effect.