docker compose 部署 nexus3

创建数据目录

mkdir -pv /data/nexus/nexus-data && chown -R 200 /data/nexus/nexus-data

docker-compose.yaml

version: '3'

services:
  nexus3:
    image: sonatype/nexus3:3.66.0
    container_name: nexus3
    restart: always
    environment:
      - TZ=Asia/Shanghai
      # - INSTALL4J_ADD_VM_PARAMS="-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m
    networks:
      nexus-bridge:
    ports:
      - 8081:8081
    volumes:
      - ./nexus-data:/nexus-data


networks:
  nexus-bridge:
    driver: bridge

运行 nexus

docker compose up -d
[+] Running 1/1
 ✔ Container nexus3  Started 

查看运行状态

docker ps
CONTAINER ID   IMAGE                    COMMAND                  CREATED              STATUS              PORTS                                       NAMES
ac1863d5cab6   sonatype/nexus3:latest   "/opt/sonatype/nexus…"   About a minute ago   Up About a minute   0.0.0.0:8081->8081/tcp, :::8081->8081/tcp   nexus3

访问 dashboard

访问地址: http://ip:8081

参考文档

https://help.sonatype.com/en/installation-methods.html

posted @ 2024-03-25 14:09  小吉猫  阅读(378)  评论(0编辑  收藏  举报