I set out to create a private Docker registry today, and I decided to use the Jockey project to make things easier. I started by pulling the Jockey image from Docker Hub. It was pretty straightforward. I just used the docker pull command, and it downloaded the image without any issues.

After I got the image, I needed to run it. I wanted to map the registry’s default port 5000 to port 5000 on my host machine. I used the docker run command with the -p option to do this. I also used the -d flag to run the container in detached mode, so it would run in the background.
Once the container was running, I wanted to see if it was working properly. I used the docker ps command to check the status of my running containers. And there it was, my Jockey container, running smoothly.
Next, I wanted to test if I could push an image to my new registry. First, I tagged a local image with the address of my new registry. I used the docker tag command, followed by docker push, to get it up to the registry. Seemed like it worked.
To verify that the image was successfully pushed, I used the curl command to hit the registry’s API. I queried the /v2/_catalog endpoint to see a list of repositories in my registry, and I saw the image I just pushed, which confirmed everything worked fine.
So, in the end, I managed to set up a private Docker registry using Jockey, and it wasn’t too difficult. All it took was a few Docker commands and a simple curl test to get everything up and running.
Here’s a breakdown of the steps I took:
- Pulled the Jockey image using docker pull.
- Ran the Jockey container with port mapping using docker run -d -p 5000:5000.
- Checked the running container using docker ps.
- Tagged a local image using docker tag.
- Pushed the image to the registry using docker push.
- Verified the push with a curl request to the /v2/_catalog endpoint.
And that’s all, that’s how I got it done. Hope it’s helpful for some of you guys.