搭建自己的私服 maven 仓库

申明:本文章所使用docker-compose配置文件纯属学习运用,非商用如有雷同请联系本人协调处理。

一、配置docker-compose.yml文件

指定docker-compose的版本

version: '3'

services:

nexus:

container_name: nexus_container

image: sonatype/nexus3

restart: always

ports:

  • '8181:8081'

volumes:

  • ./nexus3/data/:/nexus-data

  • ./nexus3/log/:/nexus-data/log/

二、执行docker-compose up -d

三、检查是否启动

注意: 第一次启动后docker会创建nexus3文件夹,它本身是不具备在宿主机上读写能力的需要给这个文件夹进行授权。命令:chmod -R 777 nexus3/例如:

四、授权

给文件夹授权:chmod -R 777 nexus3/

五、重启

到了这里maven库算是搭建好了,接下来登录一般账户是admin、密码在/home/maven/nexus3/data/文件夹下的admin.password 找到后浏览器输入http:xxxx:端口号是上面的8181键入后进入界面

初次进来会要求修改密码。其他点击下一步即可。

相关推荐
~~李木子~~4 小时前
通过git上传项目到码云和GitHub操作手册
git·gitee·github
songyuc7 小时前
【Git】请帮忙解释一下“git reset”
git·elasticsearch
多多*7 小时前
maven常用的命令
java·log4j·maven
AI分享猿8 小时前
雷池 WAF 免费版实测:企业用 Apache 搭环境,护住跨境电商平台
web安全·github·apache
whysqwhw9 小时前
kotlin-4
github
whysqwhw10 小时前
kotlin-3
github
whysqwhw10 小时前
kotlin-1
github
whysqwhw10 小时前
kotlin-2
github
Komorebi_999910 小时前
使用Git创建自己的分支的操作指南
git
CoderJia程序员甲12 小时前
GitHub 热榜项目 - 日榜(2025-11-09)
github