Docker private registry setup and image query api’s

FROM registry:2
RUN mkdir -m 777 data auth
ENV REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data
ENV REGISTRY_AUTH htpasswd
ENV REGISTRY_AUTH_HTPASSWD_REALM Registry
ENV REGISTRY_AUTH_HTPASSWD_PATH /auth/registry.password
RUN apk update && apk add apache2-utils
RUN cd auth && htpasswd -b -B -c registry.password admin admin
RUN htpasswd -b registry.password dev dev@dev
EXPOSE 5000
docker build -t local_registry .
docker run -p 5000:5000 -d -v /data:/data local_registry
curl -X GET -u admin:admin https://myregistry:5000/v2/_catalog
> {"repositories":["redis","ubuntu"]}
curl -X GET admin:admin https://myregistry:5000/v2/ubuntu/tags/list
> {"name":"ubuntu","tags":["14.04"]}

--

--

--

A DevOps who is passionate about Autom@tion.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Lessons from my way to find out UIZA Product roadmap

Weeknotes #16

Hello my peers , Hello readers !

The 4 Best Free Online Courses to Learn Python for Beginners

Recognize Text in Images on Android with Firebase’s ML Kit

What is the difference between static and dynamic libraries?

Understanding Terraform and Ansible

What’s the fastest way to store intermediate results in Spark?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dheeraj kumar

Dheeraj kumar

A DevOps who is passionate about Autom@tion.

More from Medium

Dockerizing Vue App With NodeJS Backend — Typescript Version

Deploy to Kubernetes in 5 minutes with Docker Compose and Okteto Cloud

Nginx server error

Docker NGINX as Reverse Proxy