Docker private warehouse and Docker-web-ui building

Source: Internet
Author: User
Tags docker run docker registry

Docker is a very hot technology at the moment, about the introduction of Docker here is not much to say, this article mainly describes how to configure Docker in the Ubuntu 14.04 environment of the local warehouse, for large-scale use of Docker in the LAN, frequently from the official website to download image files, Unacceptable, both in terms of management and efficiency. ---turn from chopping month


I. Installing Docker

Apt-get install Apt-transport-httpsapt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba88d21e9sh-c "Echo Deb Https://get.docker.com/ubuntu docker main\ >/etc/apt/ Sources.list.d/docker.list "Apt-get updateapt-get install Lxc-docker

Two. run the registry service as a container

Mkdir/data/registrydocker run-d--name registry-p xxx.xxx.xxx.xxx:5000:5000-e storage_path=/data/registry-v/data/re Gistry:/tmp/registry Registry

Three. Use Nginx to do the safety control of Docker Registry warehouse

It's very convenient to use Marvambass/nginx-registry-proxy.

(1) Configuring SSL certificates and password files

mkdir /etc/nginx/docker               ----used to store files cd /etc/nginx/dockeropenssl req -x509  -newkey rsa:4086 -keyout key.pem -out cert.pem -days 3650 -nodes     ----common name format to FQDN Htpasswd -c docker-registry.htpasswd user1       ----Create a password file/etc/nginx/docker$ lscert.pem   docker-registry.htpasswd  key.pemdocker run -d -p 443:443 -v /etc/ nginx/docker:/etc/nginx/external  --link registry:registry --name  Nginx-registry-proxy marvambass/nginx-registry-proxycat cert.pem | sudo tee -a  /ETC/SSL/CERTS/CA-CERTIFICATES.CRT 

then restart Docker;

Note Other client actions are as follows:

Cat Cert.pem | sudo tee-a/etc/ssl/certs/ca-certificates.crt

Then restart Docker.

(2) Verify Login

Edit/etc/hosts bound FQDN to intranet NIC

Docker login-u user1-p passwd-e [email protected] Login succeeded


Four. Build Docker Web UI management Repository

Docker run-d--name docker-webui-p intranet ip:8001:8080 Atcol/docker-registry-ui

(1) with Nginx Auth Basic authentication protection

Htpasswd-c Docker.user User1

To create a virtual host:

server {Listen 8010;        server_name defaults;        root HTML;         Location/{Auth_basic "Docker";        Auth_basic_user_file/etc/nginx/conf.d/docker.user;        Proxy_pass http://Intranet ip:8001/; }    }

Then visit add to fill in the specific Docker registry warehouse to

This article is from "TNT, Yun-Dimensional Road" blog, please be sure to keep this source http://tntdba.blog.51cto.com/1199791/1634706

Docker private warehouse and Docker-web-ui building

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.