Nexus3 使用和部署

本页内容

Nexus3 docker-compose 安装

创建外部存储

1mkdir -p /data/nexus
2chmod +777 -R /data/nexus

运行 docker-compose

 1version: '3'
 2services:
 3  nexus3:
 4    image: sonatype/nexus3:3.42.0
 5    container_name: nexus3
 6    ports:
 7      - 8081:8081
 8      - 5000:5000
 9    volumes:
10      - /data/nexus:/nexus-data
11    environment:
12      - INSTALL4J_ADD_VM_PARAMS=-Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=1024m -Djava.util.prefs.userRoot=/some-other-dir
13    restart: always
14    # 赋予外部root权限
15    privileged: true

docker-compose up -d 运行 docker-compose