1.下载镜像 docker pull sonatype/nexus3 2.创建/usr/local/docker/nexus/docker-compose.yml文件 version: ‘3.1’ services: nexus: image: ‘sonatype/nexus3’ restart: always container_name: nexus ports: – 8081:8081 volumes: – /usr/local/docker/nexus/data:/nexus-data 3.创建data目录,并改权