Use nexus as a private library to proxy docker to upload and download images

Use nexus as a private library to proxy docker to upload and download images

1. Nexus configuration

1. Create a docker proxy

Used to pull images from the external network warehouse to the local warehouse.

Click "create Repository" and select docker (proxy) to create

Fill in the parameters

Click "create repository" to create

2. Create docker hosted

Used to upload your own image to a private library

Click "create Repository" and select docker (hosted) to create

Fill in the parameters:

Click "create repository" to create

3. Create a docker group

Used to pull images to local use, you can download images from the external network and push images from local to private libraries

Click "create Repository" and select docker (group) to create

Used to download from the warehouse. You can download images from external warehouses and images uploaded by yourself.

Configuration parameters

Click "create repository" to create

4. Configure Docker Realm

Configure Docker Bearer Token Realm to the right and click save.

2. Docker configuration

Here we use http, not https, so we need to modify the docker configuration file

Use the command vi /etc/docker/daemon.json to modify the docker configuration file

Add the following parameters: the IP address is the IP address of the private library server, and the port is the port filled in when creating the docker group and docker hosted

{
“insecure-registries”: [“192.168.99.1:8088”, “192.168.99.1:8089”]
}

Then save it. After saving successfully, restart docker

Use docker info to check whether the configuration is successful. If the following information is displayed, the configuration is successful.

3. Upload and download images

1. Download the image

Use docker pull 192.168.99.1:8089/ubuntu to pull the image

Because anonymous pull was checked in the previous configuration, you don't need to log in to pull. If you need to control permissions and prevent anonymous pull, uncheck the following configuration

2. Upload the image

You can query the image just uploaded on nexus

Use docker pull 192.168.99.1:8088/centlocal:1.0 to pull the uploaded image

The above article uses nexus as a private library to proxy docker to upload and download image operations. This is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to create a Docker repository using Nexus
  • Using Docker to build a Nexus private warehouse to implement Maven private service

<<:  10 performance configuration items that need to be adjusted after installing MySQL

>>:  The submit event of the form does not respond

Recommend

Detailed summary of mysql sql statements to create tables

mysql create table sql statement Common SQL state...

JS deep and shallow copy details

Table of contents 1. What does shallow copy mean?...

Detailed explanation of the use of Refs in React's three major attributes

Table of contents Class Component Functional Comp...

How to monitor and delete timed out sessions in Tomcat

Preface I accidentally discovered that the half-h...

Implementation of MySQL GRANT user authorization

Authorization is to grant certain permissions to ...

How to use docker compose to build fastDFS file server

The previous article introduced a detailed exampl...

Installing Windows Server 2008 operating system on a virtual machine

This article introduces the installation of Windo...

Detailed tutorial on deploying SpringBoot + Vue project to Linux server

Preface Let me share with you how I deployed a Sp...

Example code for implementing dotted border scrolling effect with CSS

We often see a cool effect where the mouse hovers...

Basic knowledge of MySQL database

Table of contents 1. Understanding Databases 1.1 ...

How to add color mask to background image in CSS3

Some time ago, during development, I encountered ...

How to hide the version number in Nginx

Nginx hides version number In a production enviro...

Solution to Nginx SSL certificate configuration error

1. Introduction When a web project is published o...