1.查找镜像

docker search nexus

docker 安装nexus

 

2.拉取镜像

docker pull sonatype/nexus3

docker 安装nexus

 

3.启动容器

docker run -d -p 8081:8081 -p 8082:8082 -p 8083:8083 -v /etc/localtime:/etc/localtime --name nexus3   sonatype/nexus3

# -v /home/nexus/nexus-data:/nexus-data 将数据挂载到宿主机
## 8081:nexus3网页端
## 8082:docker(hosted)私有仓库,可以pull和push(后面实现docker的时候会详细说明)
## 8083:docker(proxy)代理远程仓库,只能pull(后面实现docker的时候会详细说明)

docker 安装nexus

查看日志

docker logs nexus3

4.开放端口

firewall-cmd --zone=public  --permanent --add-port=8081/tcp

firewall-cmd --zone=public  --permanent --add-port=8082/tcp

firewall-cmd --zone=public  --permanent --add-port=8083/tcp

重新启动防火墙

systemctl restart firewalld

5.访问

http://localhost:8081/

点击右上角登录 账号密码:admin/admin123

docker 安装nexus

 

 6.开机启动

docker update --restart=always nexus3

 

相关文章:

  • 2021-05-05
  • 2022-01-11
  • 2021-06-15
  • 2021-11-29
  • 2021-06-28
  • 2021-09-25
  • 2021-08-04
  • 2021-12-16
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2021-08-15
  • 2021-04-04
  • 2021-11-13
  • 2021-12-05
相关资源
相似解决方案