$ cat > nexus3.yml << EOF
version: '3'
services:
nexus:
image: sonatype/nexus3:3.50.0
restart: always
container_name: nexus3
environment:
- TZ=Asia/Shanghai
- INSTALL4J_ADD_VM_PARAMS=-Xms128m -Xmx1024m -XX:MaxDirectMemorySize=512m
ports:
- '8081:8081'
volumes:
- ./nexus-data:/nexus-data
EOF