Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


Docker 部署 Nexus

Docker Nexus DevOps 大约 642 字

搜索镜像

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
阅读 2325 · 发布于 2022-02-11

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

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

扫描二维码关注我
昵称:
随便看看 换一批