The author here is using the CnetOS6.5 system
Start the installation of Daoker tour:
[Email protected] ~]# uname-r2.6.32-431.el6.x86_64
[Email protected] ~]# Cat/etc/issuecentos release 6.5 (Final) Kernel \ r on an \m
Note that other sources may cause your kernel to be inconsistent with the Docker version, and you need to upgrade the kernel to 3.x.
Installation:
[Email protected] ~]# RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmRetrieving Http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmwarning:/var/tmp/rpm-tmp. Jn76fi:header V3 rsa/sha256 Signature, key ID 0608b895:nokeypreparing ... ################################ ########### [100%] 1:epel-release ########################################### [100%][[email protected] ~]# rpm --import/etc/pki/rpm-gpg/rpm-gpg-key-epel-6
[Email protected] ~]# yum-y install Docker-io
Start and set boot auto-start
[Email protected] ~]# service Docker startstarting cgconfig service: [OK]starting Docker: Determine [[email protected] ~]# Chkconfig Docker on
Get Cnetos image
[[email protected] ~]# Docker pull Centos:latestcentos:latest:The image is pulling has been verified511136ea3c5a:pu ll complete 5b12ef8fd570:pull complete 34943839435d:downloading [===>] 18.38 mb/232.5 MB 1h7m49s
# Official installation mode Docker pull ImageName is downloaded from Docker's Index center, ImageName is the image name, such as Docker pull Ubuntu is download base Ubuntu and tag is latest.
We can also search for containers based on Fedora and Ubuntu OS.
[[email protected] ~]# Docker search Ubuntu[[email protected] ~]# Docker search Fedora
View Docker Images
[[email protected] ~]# Docker images centosrepository TAG IMAGE ID CREATED VIRTUAL Sizecentos latest 34943839435d less than a second ago 224 MB
Run Docker run shell
[email protected] ~]# Docker run-i-t Centos/bin/bash[[email protected]/]# [[email protected]/]# [[email protected]/ ]# [[Email protected]/]#
Stop container
[[email protected] ~]# Docker stop <container id>
Remove all containers
Docker RM $ (Docker ps-a-Q)
View the sub-commands of Docker and tap Docker or the full docker help to
Common commands
Summarize common commands:
Where the <> wide parameters are required, [] widen up to be optional
Docker version View the release number of Docker, including client, server, dependent go, etc.
Docker Info View System (Docker) level information, including managed images, containers number, etc.
Docker search <image> searching for image in Docker index
Docker pull <image> drop-down image from Docker Registry server
Docker push <image|repository> push an image or repository to registry
Docker Push <image|repository>:tag Ibid, specify TAG
Docker inspect <image|container> view underlying information for image or container
Docker Images TODO filter out the intermediate image layers (intermediate image layers is what)
Docker images-a Lists all the images
Docker PS default display of container in operation
Docker Ps-l Displays the last container created, including the non-running
Docker PS-A displays all the container, including the non-running
Docker logs <container> view container logs, which are some of the output of executing commands
Docker RM <container...> Delete one or more container
Docker RM ' Docker ps-a-Q ' Remove all container
Docker Ps-a-Q | Xargs Docker rm Ibid, remove all container
Docker RMI <image...> Delete one or more image
Docker Start/stop/restart <container> Open/stop/restart container
Docker start-i <container> start a container and enter interactive mode
Docker attach <container> attach a running container
Docker run <image> <command> create container with image and execute the appropriate command, then stop
Docker run-i-T <image>/bin/bash use image to create container and enter interactive mode, the login shell is/bin/bash
Docker run-i-t-p
Docker commit <container> [Repo:tag] solid a container into a new image, followed by Repo:tag optional
Docker build <path> Look for a configuration file named Dockerfile under path path, use this configuration to generate a new image
Docker Build-t Repo[:tag] Ibid, you can specify repo and optional tag
Docker Build-< <dockerfile> using the specified dockerfile configuration file, Docker gets the content stdin, using this configuration to generate a new image
Docker Port <container> <container port> See which port is mapped to the specified port on the container, and you can actually see it with Docker PS
Http://www.linuxidc.com/Linux/2014-07/104595.htm
Centos7 Install Docker click here http://linux.cn/article-4340-1.html
Docker Introduction and combat click Here http://www.dockerpool.com/static/books/docker_practice/index.html
What exactly is Docker click here http://cloud.51cto.com/art/201411/457407.htm
CentOS6.5 kernel upgrade look here http://cn.soulmachine.me/blog/page/3/
Docker other http://docker.widuu.com/
This digest from the Internet if there is a similar, purely normal
CentOS6.5 Installing Docker