#docker安装
yum -y install docker-io
docker --version
# Docker start the process
systemctl Start docker
systemctl Status docker
systemctl enable docker - set the boot from the start docker Service
# View Mirror and download
Docker Search the Hello-world
Docker pull the Hello-world
# view the downloaded image
Docker ImagesRF Royalty Free
# mirrored run
Docker RUN the Hello-world
# View all containers (containers from the mirror)
Docker PS -a
# use docker logs view container vessel console output log acquired
docker logs hello-world
# Container operations:
docker create # Create a container but not start it
docker run # Create and start a container
docker stop # stop the container operation, sends a signal SIGTERM
docker Start # start a stopped state container
docker restart # restart a container
docker rm # delete a container
docker kill # sends a signal to the container, by default the SIGKILL
Docker connected to the attach # (entered) to a vessel running
docker wait # blocking a container until the container is stopped
# Gets information:
docker ps # show running state (Up) container
docker ps -a # show all containers, including running (Up) and exit (the Exited)
Docker # deep inside the Inspect container vessel acquired all of the information
docker logs # View container log (stdout / stderr)
docker docker events # get the server's real-time event
docker port # display container port mapping
docker top # display process container information
docker diff # display before and after the change in the container file system
# Export container:
docker cp # copies out from the container file or directory
docker export # export the entire file system to a container package tar, without layers, tag information
carried out:
docker exec # execute a command in the container, you can enter the interactive execution bash
# Mirroring:
docker images # show all the local mirror list
docker import # Create an image from a tar archive, often and export combined with
docker build # use Dockerfile to create a mirror (recommended)
Docker the commit # create a mirror from the container
docker rmi # delete a mirror
docker load # create an image from a tar package, and save with the use of
docker save # save an image as a tar package, with layers and tag information
docker history # show history command to generate a mirror image of the
docker tag # is an alias from a mirror
# Mirror warehouse (registry) Operation:
docker login # to log on to a registry
Docker from the registry warehouse Search Search # Mirror
# download the image from the warehouse to the local pull Docker
Docker # will push a push to the registry repository mirror