[root@MyCentOS]/usr/local/docker/nexus# docker images REPOSITORY TAG IMAGE ID CREATED SIZE sonatype/nexus3 latest 8eb898be2a53 12 days ago 611MB myproject latest 98cdee09487c 4 weeks ago 506MB mydocker latest 4691fd38efff 4 weeks ago 506MB mysql latest b8fd9553f1f0 5 weeks ago 445MB 1.16.1 latest 97423576f288 7 weeks ago 126MB tomcat latest 96c4e536d0eb 2 months ago 506MB centos latest 67fa590cfc1c 2 months ago 202MB nginx 1.16.141e97992fcd8 2 months ago 126MB ubuntu 16.045e13f8dd4c1a 3 months ago 120MB mysql 5.7.226bb891430fb6 15 months ago 372MB twang2218/gitlab-ce-zh 10.590543a7ab79b 15 months ago 1.58GB
[root@MyCentOS]/usr/local/docker/nexus# mkdir data [root@MyCentOS]/usr/local/docker/nexus# ls data docker-compose.yml [root@MyCentOS]/usr/local/docker/nexus# chmod 777 data
启动Nexus
1 2 3 4 5 6
[root@MyCentOS]/usr/local/docker/nexus# docker-compose up -d Creating network "nexus_default" with the default driver Creating nexus ... done [root@MyCentOS]/usr/local/docker/nexus# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5e897f337f34 sonatype/nexus3 "sh -c ${SONATYPE_DI…" 30 seconds ago Up 2 seconds 0.0.0.0:8082->8081/tcp nexus
登陆Nexus
查看admin密码
1 2 3 4 5 6 7 8
[root@MyCentOS]/usr/local/docker/nexus# docker exec -it 09b bash bash-4.4$ cd /nexus-data/ bash-4.4$ ls admin.password db generated-bundles karaf.pid log restore-from-backup blobs elasticsearch instances keystores orient tmp cache etc javaprefs lock port bash-4.4$ cat admin.password 75c4c214-cdd2-48d0-845c-03c28da34abfbash-4.4$ #