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目录,并改权限
mkdir data
chmod 775 data
4.执行docker-compose.yml文件
docker-compose up
5.配置maven认证信息
6.配置pom自动化部署
7.配置pom代理仓库