In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use Nexus to manage Docker images. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Introduction to Nexus
Nexus is a multi-functional warehouse manager and a commonly used private warehouse server software for enterprises. At present, it is often used as Maven private server and Docker private server. This article is based on Nexus version 3.5.2-01.
Nexus download
Go to: https://www.sonatype.com/download-oss-sonatype, according to the operating system, download the installation package under the corresponding operating system.
Installation
The installation of Nexus varies slightly from system to system, but is generally consistent. The following is an example of an installation in a Linux system:
Create a Linux user, for example: nexus
Useradd nexus
Extract the Nexus installation package, set permissions for the extracted files, and modify the owner to the nexus user
Chmod-R 755 * chown-R nexus:nexus *
Change directory to $NEXUS_HOME/nexus-3.5.2-01/bin directory
You need to change the nexus.rc file and change its contents to:
Run_as_user= "nexus"
Indicates that the Nexus is started by using the nexus user.
If you are prompted for file restrictions, please refer to the blog post: http://www.cnblogs.com/zengkefu/p/5649407.html for modification.
Execute the following command to see which commands Nexus provides for us.
. / nexus-- help
Something similar to the following can be displayed:
Usage:. / nexus {start | stop | run | run-redirect | status | restart | force-reload}
You can start Nexus by specifying the following command
. / nexus start
Wait a moment and Nexus will start successfully.
Account
Nexus provides the default administrator account, and the account password is admin/admin123. Users can change the default account password by themselves.
Create a Docker repository
Visit http://localhost:8081 and log in
Click the "Create repository" button to create the warehouse. Nexus supports a variety of warehouse types, such as maven, npm, docker, etc. This article creates a docker repository. Generally speaking, for a specific warehouse type (such as docker), it is subdivided into three categories, namely proxy, hosted, and group, with the following meanings:
Hosted, the local agent repository, we usually deploy our own artifacts to this type of repository, which can be push and pull.
Proxy, agents' remote repositories, which are used to represent remote public repositories, such as maven central repositories, can only be pull.
Group, warehouse group, is used to merge multiple hosted/proxy repositories. Usually we configure maven to rely on warehouse groups, which can only be pull.
This article creates a repository of type hosted
Configure the repository, as shown in the figure, and enter the following results:
In this way, the warehouse is created.
Docker configuration
Next, we need to specify the use of the Nexus repository for Docker.
Modify / etc/docker/daemon.json to add something similar to the following.
{"insecure-registries": ["192.168.1.101 virtual 8082"]...}
Restart Docker
Log in to the private warehouse docker login 192.168.1.101
You can log in to the private warehouse. Then we can do pull and push operations.
Container starts Nexus
Address: https://store.docker.com/community/images/sonatype/nexus3
Docker run-d-p 8081-name nexus sonatype/nexus3
Map the port for the started container: http://blog.csdn.net/github_29237033/article/details/46632647
So much for sharing on how to use Nexus to manage Docker images. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.