Cloud Native 8 min read

Build a Lightweight Docker Registry with Registry & Docker‑Registry‑Browser

This guide walks through setting up a lightweight private Docker image registry using the official Docker registry and the visual docker‑registry‑browser tool, covering installation, configuration, image tagging, pushing, pulling, and running a sample SpringBoot‑Vue e‑commerce application in containers.

macrozheng
macrozheng
macrozheng
Build a Lightweight Docker Registry with Registry & Docker‑Registry‑Browser
In work we sometimes need to set up a private Docker image repository; Harbor can be heavyweight, so here is a lightweight solution using registry and docker-registry-browser with visual management.

Introduction

registry

registry is the official Docker service for storing and distributing Docker images, allowing creation of private image repositories.

docker-registry-browser

docker-registry-browser is a visual management tool based on registry, enabling easy viewing and managing of images stored in registry.

Below is a screenshot of the browser interface.

mall

We will use the mall project’s image as an example. The mall project is a SpringBoot3 + Vue e‑commerce system (60K GitHub stars) with a multi‑module backend and the latest 2024 microservice architecture, deployed with Docker and K8S. It includes a front‑end shop, back‑end admin, and supports a full order flow, covering products, orders, cart, permissions, coupons, members, payments, etc.

Boot project: https://github.com/macrozheng/mall

Cloud project: https://github.com/macrozheng/mall-swarm

Video tutorials: https://www.macrozheng.com/video/

Installation

First we need to install registry and docker-registry-browser, using Docker.

registry

Pull the registry image: docker pull registry:2 Run the registry container:

docker run -p 5000:5000 --name registry2 \
--restart=always \
-e REGISTRY_STORAGE_DELETE_ENABLED="true" \
-d registry:2

docker-registry-browser

Pull the browser image: docker pull klausmeyer/docker-registry-browser Run the browser container:

docker run -p 5001:8080 --name registry-browser \
-e SECRET_KEY_BASE=123456 \
-e DOCKER_REGISTRY_URL=http://192.168.3.101:5000/v2 \
-e ENABLE_DELETE_IMAGES=true \
-d klausmeyer/docker-registry-browser

After it starts, access the UI at http://192.168.3.101:5001

Usage

We now use the mall e‑commerce project's images as an example to demonstrate repository usage.

Tag the local image to point to the registry:

docker tag mall/mall-admin:1.0-SNAPSHOT 192.168.3.101:5000/mall/mall-admin:1.0-SNAPSHOT

Push the image to the registry:

docker push 192.168.3.101:5000/mall/mall-admin:1.0-SNAPSHOT

After pushing, the image appears in docker-registry-browser.

To delete an image, open its detail page in the browser and click the delete button at the bottom.

To test pulling, remove local copies and pull from the registry:

# Remove original local images
docker rmi 192.168.3.101:5000/mall/mall-admin:1.0-SNAPSHOT
docker rmi mall/mall-admin:1.0-SNAPSHOT
# Pull from registry
docker pull 192.168.3.101:5000/mall/mall-admin:1.0-SNAPSHOT
# Retag to original name
docker tag 192.168.3.101:5000/mall/mall-admin:1.0-SNAPSHOT mall/mall-admin:1.0-SNAPSHOT

Run the mall admin backend API service:

docker run -p 8080:8080 --name mall-admin \
--link mysql:db \
--link redis:redis \
-v /etc/localtime:/etc/localtime \
-v /mydata/app/admin/logs:/var/logs \
-d mall/mall-admin:1.0-SNAPSHOT

Run the mall front‑end portal API service:

docker run -p 8085:8085 --name mall-portal \
--link mysql:db \
--link redis:redis \
--link mongo:mongo \
--link rabbitmq:rabbit \
-v /etc/localtime:/etc/localtime \
-v /mydata/app/portal/logs:/var/logs \
-d mall/mall-portal:1.0-SNAPSHOT

Conclusion

We have shown how to build a lightweight Docker image repository using registry and docker-registry-browser, which is simpler than the heavyweight Harbor solution.

Project Links

docker-registry-browser : https://github.com/klausmeyer/docker-registry-browser

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerKubernetesDevOpsContainerRegistry
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.