docker install the specified version nexus3

1 Download the specified version of Mirror

 docker  pull  sonatype/nexus3:3.18.1

2 host create a directory mapping, and set the owner

mkdir  -p  /app/nexus3/nexus-data 

chown -R 200 /app/nexus3/nexus-data   (意思是,给这目录分配了UID为200的用户,nexus3会使用UID为200的用户操作该目录,否者会报错)

3 Start container

docker run -d -p 8081:8081 --name  nexus    -v /app/nexus3/nexus-data:/nexus-data  sonatype/nexus3:3.18.1

4 View nexus3 whether to start successful

curl http://localhost:8081

5 View container logs

docker  logs -f  containerId

 6 References

https://hub.docker.com/r/sonatype/nexus3

 

Guess you like

Origin www.cnblogs.com/moris5013/p/11440784.html