Docker 部署 Nexus

Docker Nexus DevOps About 642 words

搜索镜像

docker search nexus

拉取镜像

版本号或更多配置可以去官网查看:https://hub.docker.com/r/sonatype/nexus3

docker pull sonatype/nexus3:3.37.3

创建容器

8081Nexus服务访问端口,8082~`8084`是仓库端口。

docker run -d \
--name nexus \
-p 8081:8081 \
-p 8082:8082 \
-p 8083:8083 \
-p 8084:8084 \
-p 8085:8085 \
-v $PWD/nexus/data:/nexus-data \
sonatype/nexus3:3.37.3

查看日志

docker logs -f nexus

输出:(启动成功)

-------------------------------------------------

Started Sonatype Nexus OSS 3.37.3-02

-------------------------------------------------

查看密码

docker exec -it nexus more /nexus-data/admin.password

进入容器

docker exec -it nexus bash

停止容器

确保数据库正常停止,增加关闭时间。

docker stop --time=120 nexus
Views: 3,128 · Posted: 2022-02-11

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh