In order to build a private Maven library in the company, I chose Sonatype Nexus oss to install it in the Docker to do the test on this machine.
Installing Docker on 1.Mac
: https://github.com/boot2docker/osx-installer/releases
Open the installation package, the next step until the installation is complete, no complicated place
After the installation is complete, enter the following command to verify
$docker run ubuntu echohello world
The normal situation will print out Hello World
You may also use the Boot2docker IP to view the IP address, which is usually 192.168.59.103
The installation of Docker is basically over.
2. Installing in DockerNexus
Very simple, pull in Docker first, command is
$Docker Pull Sonatype/nexus
There may be failures, try more times
Pull is finished and can be run and entered in Commad
$docker run-d-P 8081:8081--name Nexus Sonatype/nexus:oss
But for the first time, the following error occurred
Unable to find image ' Sonatype/nexus:oss ' locally
And then automatically pull the Sonatype/nexus, do not know why, know the children's shoes can be in the comment area below to leave me a message
The above problems can be ignored, and then run the command, there will be a hint:
Error response from Daemon:conflict. The name "Nexus" is already on use by container 80289ffddb82. You had to delete (or rename) that container to be able to reuse that name.
I ignored the hint because the first nexus should be running.
Enter http://192.168.59.103:8081/in the browser, the page opens normally
The preparation is done.
3.nexus Necessary Settings
The above has been installed, login, the default user name and password are: admin admin123
Next setup
Save the settings so that the warehouse is finished
Create a private Maven library