Docker之Nexus搭建Maven仓库
Maven公服 http://maven.aliyun.com 1. https://hub.docker.com 搜索nexus 2. docker pull sonatype/nexus3 3. 创建Docker目录,创建nexus目录 cd /usr/local/ mkdir docker cd docker / mkdir nexus cd nexus / vi docker -compose.yml 4. 使用Docker来安装和运行Nexus,docker-compose.yml配置如下: version:'3.1' services: nexus: restart:always image:sonatype / nexus3 container_name:nexus ports: -8081:8081 volumes: - /usr/local/docker/nexus/data:/nexus- data 5. docker-compose up -d 6. 访问http://ip:8081 7. 看日志 docker ps docker logs containerID 8. 如果报错没权限 查看data中是否有数据,让data有所有权限 cd /data/ ll docker - compose down chmod 777 data/ 9. docker