Post

Nexus

Sonatype Nexus Repository delivers universal support

Nexus

what is Nexus Repository Manager

Nexus Repository Manager is a popular artifact repository management tool developed by Sonatype. It is widely used in DevOps and software development to store, manage, and distribute artifacts such as binaries, libraries, Docker images, and other build artifacts.

Nexus Repository Manager supports multiple repository formats, including Maven, npm, Docker, PyPI, NuGet, and more.

Nexus

To deploy Nexus Repository Manager using Docker Compose, you can use the official Sonatype Nexus 3 Docker image. Below is a step-by-step guide and a sample docker-compose.yaml file to get you started.

Create a docker-compose.yaml File

Create a directory nexus

1
mkdir nexus && cd nexus

Create a file named docker-compose.yaml with the following content:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
services:
  nexus:
    image: sonatype/nexus3:latest
    container_name: nexus
    ports:
      - "8081:8081"
    volumes:
      - nexus-data:/nexus-data
    environment:
      - INSTALL4J_ADD_VM_PARAMS=-Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m
    restart: unless-stopped

volumes:
  nexus-data:

Start Nexus with Docker Compose

Run the following command in the directory where your docker-compose.yml file is located:

1
docker-compose up -d

Access Nexus Web UI

Once the container is running, open your browser and navigate to: http://localhost:8081

Default Admin Credentials:

  • Username: admin
  • Password: Check the admin.password file in the nexus-data volume for the initial password. You can find it by running:
    1
    
    docker exec -it nexus cat /nexus-data/admin.password
    

Configure Nexus

  1. Log in with the default admin credentials.
  2. Change the admin password when prompted.
  3. Set up repositories (e.g., Docker, Maven, npm) as needed.
This post is licensed under CC BY 4.0 by the author.