官术网_书友最值得收藏!

  • Deployment with Docker
  • Srdjan Grubor
  • 379字
  • 2021-07-02 23:22:15

Docker commands

Here are all of the commands we covered for Docker with a few others added, which you might use if you build containers frequently:

For more in-depth information about parameters required for each, or to see commands that we have not covered yet, type docker help in the Terminal or the command by itself into the Terminal. You can also visit https://docs.docker.com/ and explore the documentation if the information provided by the CLI output is not good enough, and it may contain more recent data.

docker attach - Attach the shell's input/output/error stream to the container
docker build - Build a Docker image based on a provided Dockerfile
docker cp - Copy files between container and host
docker exec - Execute a command in a running container
docker images - List image available to your installation of docker
docker info - Display information about the system
docker inspect - Display information about Docker layers, containers, images, etc
docker kill - Forcefully terminate a container
docker logs - Display logs from a container since it last started
docker pause - Pause all processes within a container
docker ps - List information about containers and their resource usage
docker pull - Pull an image from a remote repository into the local registry
docker push - Push an image from the local registry into a remote repository
docker rm - Remove a container
docker rmi - Remove an image from the local repository
docker run - Start a new container and run it
docker search - Search DockerHub for images
docker start - Start a stopped container
docker stop - Stop a running container nicely (wait for container to shut down)
docker tag - Create a tag for an image
docker top - Show running processes of a container
docker unpause - Resume all processes in a paused container
docker version - Show the Docker version

Recently, Docker commands have begun to be isolated into their own docker CLI sections like docker container, to separate them from other cluster management commands. To use this newer syntax, just prepend any command with the container (that is, docker stop turns into docker container stop). You can feel free to use either version, though keep an eye out as you can probably expect the older style to be deprecated at some point even though the new style is overly verbose for most Docker usage.

主站蜘蛛池模板: 桃源县| 肇东市| 平安县| 建阳市| 望奎县| 扶沟县| 和平区| 大港区| 盘山县| 古蔺县| 万州区| 南昌县| 廉江市| 金湖县| 密云县| 威信县| 百色市| 博兴县| 扶余县| 平凉市| 濮阳县| 法库县| 曲麻莱县| 虞城县| 台南市| 许昌市| 安阳市| 迁西县| 龙岩市| 昌都县| 中阳县| 枣庄市| 古浪县| 阿拉善右旗| 木里| 永康市| 上高县| 那坡县| 贵阳市| 陕西省| 合水县|