How to Setup Nexus 3 on Docker With a Host Mount


(Lisa Mathew) #1
  1. Create a host directory

    mkdir /opt/nexus-data && chown -R 200 /opt/nexus-data
    
  2. Deploy nexus using the following command.

    docker run -d -p 8081:8081 --name nexus -v /opt/nexus-data:/nexus-data sonatype/nexus3
    

The above command will deploy a nexus 3 container with host port mapped to 8081.
Once the container is deployed, you will be able to access nexus using the following URL syntax.

 http://<your-IP\>:8081

The default username and password for nexus 3 signin is shown below.

user: admin
password: admin123