Build a docker repository on raspberry pi

Overview

To build a docker warehouse, you need to use the official registry image, but the official registry image does not support arm, so you cannot use the official registry image, but someone has made a registry image suitable for Raspberry Pi

operate

Building a mirror warehouse is actually very simple. First, pull the registry image of the arm version, docker pull budry/registry-armthen create a directory to store the mirror file mkdir registry, then run the container docker run --name registry-arm -d -p 5000:5000 -v /root/registry:/var/lib/registry --restart always budry/registry-arm, and then configure the warehouse in the docker host where the warehouse is to be used. For example, I am in another Raspberry Pi. configure

{
	"registry-mirrors": [""],
	"insecure-registries": ["192.168.1.7:5000"]
	
}

After the modification is completed, restart docker, then pull an image down docker pull ubuntu:16.04, rename the image docker tag ubuntu:16.04 192.168.1.7:5000/ubuntu:16.04, and push it to the warehouse docker push 192.168.1.7:5000/ubuntu:16.04. After that, you can check whether there is a push in the registry directory of the host computer of the warehouse.

In fact, multiple warehouses can be set up, similar to the following

{
	"registry-mirrors": [""],
	"insecure-registries": [
		"192.168.1.7:5000",
		"192.168.1.4:5000"
	]
	
}

If you want to push to a different repository, just label the image differently

Welcome to follow Bboysoul's blog www.bboysoul.com Have Fun

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325696693&siteId=291194637