Tip: 1 in the case of graphics centos6.6 do not upgrade the kernel can be deployed successfully
2 text mode centos6.6 failed, it is estimated that some modules are not
3.failed to find the CGroup root, mountpoint for devices not found errors are because of the absence of any cgconfig operation resulted in, however, need to pay attention to. Cgconfig need to run the service before docker.
Recently, hot Docker has become a key technology to deploy applications to the cloud environment. Compared with the traditional hardware virtualization technology, based on docker container sandbox for application deployment environment offers a number of advantages, such as light isolation, deployed applications easy to transplant, easy to maintain. Now, the Red Hat Inc is leading the open source community, trying to streamline the management and deployment of Docker container tasks.
Docker is not only applicable to the cloud environment, it is also very useful for end users, if you want to test a certain software in a specific Linux environment, it is even more so. You can easily build a Docker container for the target environment, install and test software in it, and then once you have finished the work, you can throw away the container. The whole process from beginning to end is quite efficient and convenient, and you can always avoid making your terminal system at a mess.
In this tutorial, I will introduce how to create and manage Docker containers on CentOS or Fedora. Please note: at the moment, Docker is supported on 64 host systems. If you want to have a try on Docker Ubuntu, please refer to this tutorial: http://xmodulo.com/manage-linux-containers-docker-ubuntu.html.
Install Docker on CentOS or Fedora
To install the Docker to the CentOS, the EPEL software library is first enabled,
RPM -ivh sudoHttp://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
Note: ordinary users access to sudo, modify /etc/sudoers, copy root that line (ALL= ALL (ALL:ALL) root), and then modify
Then use the yum command:
To install Docker on the Fedora, use the following commands:
After you install Docker to CentOS or Fedora, you need to add yourself to the docker group, so that you can run the Docker as a non root user. To this end, use this command:
Exit, re login to activate group changes.
At this point, you should be able to run the docker command as a non privileged user.
The basic usage of Docker
You want to start a new Docker container, you need to determine which Docker image for the container to use. You can search for the official Docker image index (https://index.docker.io), which lists the publicly available Docker images. Docker index includes: Docker team management Linux basic image (such as Ubuntu, Debian, Fedora and CentOS), as well as the user's contribution to the custom image (such as MySQL, Redis and WordPress).
For example, when you want to open a Ubuntu container in an interactive mode, you have to run the following command. Once the container is started, the final variable "/bin/bash" is executed in the container.
When you first run the command above, it will download the available one or more docker Ubuntu images over the network, and then use the image to start the Docker container. The Ubuntu container will start immediately, you will see the container inside the console prompt. Ubuntu operating system you can access the container inside the sandbox with complete function.
If you type in the prompt exit, will withdraw the containers, the containers will be stopped.
Would like to list all containers (including containers that have been stopped), run the command:
Would like to restart in the process of the guardian of a stopped container:
Would like to remove the container that has been stopped:
Would like to connect to a container that runs in the background to see the container or interact with it:
You can customize the operation of a container (such as installing new software). If you want to save changes to the content in the current container, you must first exit containers of interactive mode in the prompt type "exit". Then use this command to save the changed image as a different image:
Want to get your container ID, you can use the description of the "PS docker - a" command.
Once you have constructed a new image like this, you can start a new container with the image.
You can also download any open container images (such as bowery/mysql, Ubuntu) and save them to the local library, as shown below.
Would like to see all the local download / save the container image:
You can choose from which specific image to start the container:
To remove a container image from a local software library:
- step on
- Guess you're looking for