Create a private repository using docker

Source: Internet
Author: User
Tags docker run

Create a private repository using docker

Lab environment:

650) This. width = 650; "Title =" 1.png" alt = "wkiol1sx86lyhdgeaac8mazxmy8919.jpg" src = "http://s3.51cto.com/wyfs02/M00/58/74/wKioL1Sx86LyHDgeAAC8mazxmY8919.jpg"/>

How to connect VMware to viutualbox is not described in detail here.

  1. Install docker on xin7

First, download the docker's WINDOS installation package from the official site of docker. Due to the wall, this installation package is very difficult. Here, we provide my Network Disk link http://pan.baidu.com/s/1ddgqhzb.

Because docker is based on the Linux platform, the installer will install a virtualbox virtual machine, generate a boot2docker docker environment on the virtual machine, and generate a shortcut for boot2docker start on the desktop, double-click it.

Note: If you have not installed docker on Vmware, you can install the required Virtual Machine on virtualbox, which can reduce the complexity of software intercommunication between the two virtual machines.

Note: In the installation directory of boot2docker, there will be a Delete. SH and start. sh. When the docker environment crashes, you can use these two scripts for initialization (the original virtual machine will be deleted, so be careful when using them ).

  1. Install docker private Repository

    # Docker pull Registry

    # Docker run-D-P 5000: 5000/mnt/SDA/Registry:/tmp/registryregistry

Registry, which is officially provided by docker, is used to set up a private repository environment, so that the repository is OK.

  1. Client persistent Transmission

Note: Because the Registry image is not used to start the repository, you must add the option to ignore the certificate when starting the client. Otherwise, the failure will occur. /Usr/bin/docker-d -- insecure-Registry 192.168.59.105: 5000. Modify/etc/sysconfig/docker to add other_args = "-- insecure-registry192.168.59.105: 5000" so that this option is included when service docker start is used, and 59.105 is my private repository IP. The Ubuntu environment may be changed under/etc/default/docker. You can make response adjustments to your environment.

# Docker tag Ubuntu: 14.04 192.168.59.105: 5000/test

# Docker push 192.168.59.105: 5000/test

# Curl http: // 192.168.59.105: 5000/V1/search

If [{"Description": "", "name": "Library/Ubuntu"}] is displayed, the image is uploaded successfully.

In this way, we can go to another machine to use the pull image.

Note: You must change the image name to 192.168.59.105: 5000/test repository/Name: tag to upload the image.


The blogger started to learn about docker and build a self-built Communication Group: 343948464. If you are interested, join.


Create a private repository using docker

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.