说是低配置你也不能太低,不然神仙来了也帮不了你。
2G内存总得有吧。
version: "3.8"
services:
nexus:
image: sonatype/nexus3:latest
container_name: nexus-oss-lowmem
restart: unless-stopped
ports:
- "8081:8081"
volumes:
- /deploy/nexus/data:/nexus-data
environment:
# JVM 内存优化参数,主要是这里。
- INSTALL4J_ADD_VM_PARAMS=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m -XX:+UseG1GC -XX:+PerfDisableSharedMem -Djava.awt.headless=true -Djava.util.prefs.userRoot=/nexus-data/javaprefs
# 禁止匿名访问
- NEXUS_SECURITY_ANONYMOUS_ACCESS_ENABLED=true
# 可选:限制资源使用。
#deploy:
# resources:
# limits:
# memory: 1536M
# reservations:
# memory: 512M

765

被折叠的 条评论
为什么被折叠?



