Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
Docker

Docker: Use Docker Registry for Image Storage

- 12.07.26 - ErcanOPAK

📦 Docker Registry = Image Storage

Images need a home. Docker Registry stores and distributes images. Public, private, secure.

📝 Registry Basics

# Public Registry (Docker Hub)
docker login
docker pull nginx:latest
docker push username/myapp:latest

# Private Registry
# Run registry
docker run -d -p 5000:5000 --name registry registry:2

# Push to private registry
docker tag myapp localhost:5000/myapp
docker push localhost:5000/myapp

# Pull from private registry
docker pull localhost:5000/myapp

# Registry with authentication
docker run -d -p 5000:5000 \
    -e REGISTRY_AUTH=htpasswd \
    -e REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm" \
    -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
    -v /auth:/auth \
    registry:2

🎯 Registry Management

# Cloud Registries
# AWS ECR
aws ecr create-repository --repository-name myapp
docker tag myapp:latest aws_account_id.dkr.ecr.region.amazonaws.com/myapp:latest
docker push aws_account_id.dkr.ecr.region.amazonaws.com/myapp:latest

# Azure ACR
az acr create --name myregistry --sku Basic
az acr login --name myregistry
docker tag myapp myregistry.azurecr.io/myapp:latest
docker push myregistry.azurecr.io/myapp:latest

# Google GCR
gcloud auth configure-docker
docker tag myapp gcr.io/my-project/myapp:latest
docker push gcr.io/my-project/myapp:latest

# Registry Commands
# List images (using API)
curl -X GET http://localhost:5000/v2/_catalog

# Delete image
# Requires registry:2 with delete enabled
docker run --rm -v /var/lib/registry:/registry registry:2 \
    registry garbage-collect /etc/docker/registry/config.yml

# Clean up
docker system prune -a

# Registry UI
docker run -d -p 8080:80 konradkleine/docker-registry-frontend

💡 Registry Tips

  • Use private registry for internal images
  • Use cloud registries for production
  • Tag images with version numbers
  • Clean old images regularly
  • Secure registry with authentication

“Docker Registry stores and distributes images. Public, private, secure. Essential for container workflow.”

— DevOps Engineer

Related posts:

Docker: Use docker compose watch to Auto-Rebuild on File Changes

Docker: Use Health Checks for Container Monitoring

Docker: Master Container Lifecycle Management

Post Views: 0

Post navigation

Kubernetes: Manage Storage with Persistent Volumes
AI Prompt: Generate Newsletter Content

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

July 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Jun    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (857)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (597)
  • Add Constraint to SQL Table to ensure email contains @ (582)
  • Average of all values in a column that are not zero in SQL (545)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (512)
  • Find numbers with more than two decimal places in SQL (460)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes
  • Ajax: Use Axios for HTTP Requests
  • JavaScript: Understand Hoisting
  • HTML: Use Web Storage for Client-Side Data
  • CSS: Use Filter Effects for Visual Magic
  • Windows 11: Unlock God Mode for All Settings

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (960)
  • How to add default value for Entity Framework migrations for DateTime and Bool (898)
  • How to make theater mode the default for Youtube (857)
  • Get the First and Last Word from a String or Sentence in SQL (840)
  • How to select distinct rows in a datatable in C# (814)

Recent Posts

  • C#: Use Using Statements for Resource Management
  • C#: Use Lambda Expressions for Concise Code
  • SQL: Use GROUP BY for Data Aggregation
  • .NET Core: Master Routing for Clean URLs
  • Git: Use Reset to Undo Local Changes

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com