version: "3"
services:
nexus:
# restart: always
image: sonatype/nexus3
container_name: nexus
privileged: true
user: root
ports:
- 8081:8081
volumes:
- /docker/Nexus/data:/nexus-data
默认用户为admin,进入容器查看默认密码:
[root@centos1810-100 nexus]# docker exec -it -u root nexus /bin/bash
[root@1ff7b9262d2a /]# find / -name "admin.password"
/nexus-data/admin.password
[root@1ff7b9262d2a /]# cat /nexus-data/admin.password
0f566568-5803-4071-9ba6-ba82bf18ad41[root@1ff7b9262d2a /]#