An Enthusiastic Programmer

Using Nexus3 as your repository - A Simple Guide(No Deep Shit!)


In this article, I will guide you to set up a simple nexus3 instance.

Running nexus3 on docker

I am using the sonatype/nexus3 image for demonstration. There are multiple ways that you can set up a nexus3 instance. You can either unpack the archive in a directory to which you have full access, or you can install it with a Docker image. Take a look at sonatype Nexus Repository Manager 3 Installation for more details.

The following docker-compose.xml utilize the sonatype/nexus3 image to achieve the installation.

version: "3.3"
    restart: always
    image: sonatype/nexus3
      - "8081:8081"
      - nexus-data:/nexus-data
        driver: local
            type: 'none'
            o: 'bind'
            device: '${PWD}/nexus-data'

You should create a folder nexus-data in your current directory at first, then use command docker-compose up -d to running up. The nexus-data folder will be used to store your persistent data.

$ mkdir nexus-data
$ docker-compose up -d

Creating A Repository

create a docker repository

make your docker repository private

Pushing and Pulling Images