You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
857 B
857 B
NEXUS 安装
创建路径
mkdir /usr/local/nexus && chown -R 200 /usr/local/nexus
COMPOSE 文件
cat > /usr/local/nexus/docker-compose.yml <<'EOF'
version: '3'
services:
nexus3:
restart: always
container_name: nexus
image: sonatype/nexus3
environment:
- INSTALL4J_ADD_VM_PARAMS=-Xms2g -Xmx2g -XX:MaxDirectMemorySize=2g -Duser.timezone=Asia/Shanghai
ports:
- 8081:8081
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/run/docker.sock:/var/run/docker.sock
- /usr/local/nexus:/nexus-data
healthcheck:
test: ["CMD-SHELL", "curl -f localhost:8081 || exit 1"]
logging:
driver: "json-file"
options:
max-size: "10m"
EOF
启动
cd /usr/local/nexus/ && docker-compose up -d