nexus docker-compose部署

docker-compose.yaml

version: '3'
services:
    nexus3:
      image: 'sonatype/nexus3'
      container_name: nexus3
      restart: always
      hostname: 'nexus3'
      ports:
        - '8081:8081'
      volumes:
        - data:/nexus-data
        - /etc/localtime:/etc/localtime
      logging:
        driver: "json-file"
        options:
          max-file: '3'
          max-size: "20m"
volumes:
    data:

访问

http://ip:8081

默认密码

cat /var/lib/docker/volumes/nexus_data/_data/admin.password 

遇到权限不足执行

mkdir /some/dir/nexus-data && chown -R 200 /some/dir/nexus-data

你可能感兴趣的:(nexus docker-compose部署)