Sometimes it is inconvenient to use a public repository such as Docker Hub, and the company's private images are not pushed to the docker hub for business security. You can create a local repository for private use. Similar to git and maven, it saves the server bandwidth for downloading and uploading images.What is docker registry?
Less than a second ago 196.5 MB# start a Container and install httpd[root@linuxprobe ~]# docker run centos /bin/bash -c "yum -y update; yum -y install httpd"[root@linuxprobe ~]# docker ps -a | head -2CONTAINER ID IMAGE COMMAND CREATED STATUS
executed container as follows
[Root@linuxprobe ~]# Docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
Docker.io/centos latest 0584b3d2cf6d less than a second ago 196.5 MB
# Start a Container and install httpd
[Root@lin Uxprobe ~]# Docker Run centos
the only thing that can be done with automatic configuration. But LOOP-LVM's approach is very bad, its stability, performance is worse, both in the log or Docker info will see a warning message. The official documentation has a clear article on how to configure a block device to give the Devicemapper driver a storage layer approach, which is also known as configuration DIRECT-LVM. In addition to the previously mentioned problem, Devicemapper + LOOP-L
Install Docker CE community edition in CentOS 7
Docker CE for CentOS
Features and advantages
It is easy to install and set up an optimized Docker environment for CentOS distribution on
public warehouse is the Docker Hub, storing a large number of mirrors for users to download.
Docker warehouse is used to save our images, when we create our own image we can use the push command to upload it to the public or private warehouse, so the next time to use this image on another machine, only need to pull d
by running the following steps,
$ Rpm-Uvh https://dl.Fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
Once the repository has been installed, we can simply install docker by using yum,
$ Yum install docker
Next, start the Docker service,
$ Systemctl start
input http://192.168.0.191:8081/, you can see another nginx has been started(4) The difference between the Docker deployment application and the traditional deployment application can be realized here, the traditional deployment, the need to manually copy more Nginx, then configure the port, and Docker deployment, on the basis of the production of a good image,
started,(3) Restart more than one container, Docker run-d-P 8081:80 nginx:1.9, browser input http://192.168.0.191:8081/, you can see another nginx has been started(4) The difference between the Docker deployment application and the traditional deployment application can be realized here, the traditional deployment, the need to manually copy more Nginx, then configure the port, and
Restart the server, previously able to run the Docker network applications can not be opened normally.
Because of the use of CENTOS7, so speculation is likely to be a iptables problem.
Docker start or run always prompt for a similar error:No Chain/target/match by that name
Google a bit, and some people actually encountered similar problems.Centos 7 of/etc/sysconf
-compose.yml fileUpstream App {{{Range service ' Logapi '}}server {.} address}}:{{. Port}} max_fails=3 fail_timeout=60 weight=1;{{Else}}server 127.0.0.1:65535; # force a 502{{end}}}server {Listen default_server;Location/{Proxy_pass Http://app;Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;Proxy_set_header Host $host;Proxy_set_header X-real-ip $remote _addr;}}Go to the directory where the Docker-compose.yml file is locatedRunning sudo
installation is complete, run the following command to start the docker service and set it to boot:
[root@localhost ~]# service docker start
[root@localhost ~]# chkconfig docker on
The old sysv syntax is used here. For example, the new systemd syntax supported in CentOS 7
Tags: dockerScenario One: Use wget to download the latest version of Tomcat build when Docker is created#centos7+oraclejdk7+tomcat7 from centos:centos7 maintaineryuj Scenario Two: Build with the Tomcat compression package downloaded on the Docker server (apache-tomcat-7.0.63.tar.gz is used here) #centos7+oraclejdk7+tomcat7 fromcentos:centos7 maintaineryuj Use Docker
command:[Root@localhost ~]# Yum Install Docker
start the Docker serviceAfter the installation is complete, use the following command to start the Docker service and set it to boot:[root@localhost ~]# Service Docker start[Root@localhost ~]# Chkconfig Docker on(LCTT: The
1.centos 7Installing CentOS 7 from a VM virtual machine under Windows:vmware-workstation-full-10.0.3-1895310CentOS 72. RequirementsThe kernel version of the operating system cannot be less than 3.10To view the kernel version:uname -R3. Installation 3.1 with Yum installationNeed to be connected to the InternetYum Update3.1.2 Join Yum Reposudo Tee /etc/yumrepos.d/d
CentOS 7 x64 Docker useCentOS 7 Installation DockerYum Search Docker to see if a Docker package is availableYum Info Docker version is 1.3.2Yum-y Install
Install Docker In Debian 7 to virtualize A CentOS
Currently, docker supports only Ubuntu 12.04 + and Debian 8.0 Jessie (64-bit) operating systems and does not support Debian 7 Wheezy. Before Running Docker, Linux kernel must be ab
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.