docker-compose部署Nexus3

docker-compose部署Nexus3

镜像源获取最新镜像:(国内可能需要魔法)

搜索镜像:sonatype/nexus

编写docker-compose.yaml配置文件

version: '3.1'
services:
  nexus:
    restart: always
    image: sonatype/nexus3:3.58.1
    container_name: nexus3
    environment:
    	INSTALL4J_ADD_VM_PARAMS: -XX:ActiveProcessorCount=4
    ports:
      - 8081:8081
    volumes:
      - ./data:/nexus-data

注意在挂载数据卷的时候可能需要data目录更高的权限

启动成功后访问页面:xxxx.xxxx.xxx.xxxx:8081

0%