byamri.com | Install Nexus Registry with Docker

Complete Guide: Installing Nexus Registry with Docker for Efficient Container Management

Docker Oct 15, 2025

In this guide, you’ll learn how to install and configure Nexus Registry with Docker to manage your container images efficiently. Nexus Repository is a powerful tool for storing and distributing Docker images privately within your organization. By setting up a Nexus Docker registry, you can centralize image management, improve deployment speed, and secure your DevOps workflow.

Docker is an open-source platform that simplifies the process of building, running, and sharing applications through lightweight containers. When integrated with Nexus Repository, Docker becomes even more efficient — allowing developers to host their own private Docker registry for better control, faster builds, and reduced dependency on public registries.

This article provides a step-by-step tutorial to help you set up Nexus Repository as a Docker registry using containers, ensuring a reliable and scalable image management solution for modern infrastructure.

Steps:

  1. Create Docker Compose
version: "3"
services:
  nexus:
    container_name: nexus
    image: sonatype/nexus3
    restart: always
    volumes:
      - "./nexus-data:/sonatype-work"
    ports:
      - "8081:8081"
      - "8085:8085"
      - "5000-5002":"5000-5002"
    environment:
      - TZ=Asia/Jakarta

byamri.com | docker-compose.yaml

  1. Running this command
docker compose up -d
  1. Get admin password by executing below command
docker exec -it nexus cat /nexus-data/admin.password
  1. Default username
Username: admin
Password: <output command sebelumnya>

Tags

Roby Yasir Amri

I am interested in technological developments related to Cloud Computing, Linux, DevOps, Scripting, and Programming.