docker search nexus
docker pull nexus...
docker run -d -p 8081:8081 --name nexus -v /home/docker/nexus/data:/var/nexus-data --restart=always docker.io/sonatype/nexus3
http://192.168.2.5:8081/
默认用户名与密码:
1、老版:admin/admin123
2、新版:find / -name ‘admin.password‘
登录后,提示重置密码,修改为admin即可
上传nexus私服:
<distributionManagement> <repository> <id>mayikt</id> <url>http://192.168.2.5:8081/repository/mayikt-release/</url> </repository> </distributionManagement> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
从nexus引入:
<repositories> <repository> <id>mqyikt</id> <url>http://192.168.2.5:8081/repository/mayikt-release/</url> </repository> </repositories>
原文:https://www.cnblogs.com/flame540/p/13405033.html