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

Mysql sorting and paging (order by & limit) and existing pitfalls

Sorting query (order by) In e-commerce: We want t...

How to use Element in React project

This is my first time using the element framework...

MySQL multi-table join query example explanation

In actual projects, there are relationships betwe...

Windows Service 2016 Datacenter\Stand\Embedded Activation Method (2021)

Run cmd with administrator privileges slmgr /ipk ...

Example code for implementing auto-increment sequence in mysql

1. Create a sequence table CREATE TABLE `sequence...

Installation tutorial of docker in linux

The Docker package is already included in the def...

How to operate Docker and images

Find mirror We can search for images from the Doc...

How to manage users and groups when running Docker

Docker is a management tool that uses processes a...

Implementation of waterfall layout in uni-app project

GitHub address, you can star it if you like it Pl...

XHTML introductory tutorial: Use of list tags

Lists are used to list a series of similar or rela...

Linux virtual memory settings tutorial and practice

What is Virtual Memory? First, I will directly qu...

Common JavaScript memory errors and solutions

Table of contents 1. Timer monitoring 2. Event mo...

Detailed tutorial on installing Hbase 2.3.5 on Vmware + Ubuntu18.04

Preface The previous article installed Hadoop, an...

Practical method of deleting files from Linux command line

rm Command The rm command is a command that most ...