Setup a Docker Registry in minutes with JFrog Artifactory

Install Artifactory as your in-house Docker Registry. Within 1 minute you can be set up to apply Docker push and Docker pull using Artifactory as your secure, private Docker registry. Distribute and share images within your organization using local repositories, use permissions to apply security and access control over docker repositories, provide reliable and consistent access to images and offer flexible and smart search to find any Docker image stored within Artifactory.

For more details on setting up your Docker registry, please refer to the JFrog Artifactory user guide. You can get started with a free 30-day trial here.

Artifactory Free Trial

Setup a Docker Registry in minutes

This screencast will show you how to set up JFrog Artifactory as a Docker image and start using it as a private, secure Docker registry in minutes. JFrog Artifactory is a universal artifact repository. It works with different build tools, CI servers, and packaging systems. Please see additional screencasts from JFrog to learn how to use Artifactory with other tools.

Download and Installation

After requesting an Artifactory license, or as part of an upgrade notification, you will get an email from JFrog containing a link to a special Bintray page with Artifactory downloads. We will pull in an official Artifactory Docker image from Bintray. JFrog Bintray is a modern, feature-rich distribution platform. For example, you can use Bintray to get notifications when new versions of Artifactory are released.

There are more ways to install Artifactory. Stand along zip file with embedded Tomcat server, deploying WAR file into existing Tomcat container, or RPM and Debian distributions for Linux. Please note that Docker image is the only flavor that comes with preconfigured Docker registry set-up.

Running Artifactory as a Docker Container

Once all the layers were resolved, we can start up the container. You can find the run command in Artifactory user guide. We’ll copy-paste it from there.

We will change the command to match our case. The version will be the latest. We’ll skip the volume mount for the screencast. And we’ll set the container name to be Artifactory.

Please also note the ports forwarding. They are used to map multiple Artifactory repositories to a single domain and we’ll use them down the road. Now when Artifactory is up and running, let’s browse to its web interface.

Docker Refistry in Artifactory's Web Interface


First, you need to install the license. Simply paste the license code that was sent to you by JFrog. Now Artifactory is ready to use.

Artifactory as a Docker Registry

As you can see, Artifactory already comes preconfigured with five Docker repositories: Four locals, docker-dev-local for versions one and two of the registry and docker-prod-local. Local repositories are used for pushing your own Docker images. And the differentiation between development and production repositories exists to build promotion pipelines on top of them.

Artifactory also already has a remote repository preconfigured. The docker-remote proxies the official Docker hub to allow locality, network independence, and control.

Docker Registries in Artifactory

Pulling a Docker Image

Let’s start working with Artifactory by pulling an image from Docker hub via Artifactory remote repository. For setting up your tools to work with Artifactory, the Set Me Up button is your best friend. The pop-up window gives you all the instructions. And provides you with valuable configuration snippets. It is context sensitive and shows the relevant information based on the focus location in the tree browser.

On the Set Me Up screen for remote repository, we can see the pull command that should work with a virtual host configured for that repository. Since we got the NGINX preconfigured, inside Artifactory container, we’ll refer to the install documentation to discover the virtual host and port mappings. As you can see, the Docker remote repository is mapped to port 5000.

Let’s try to pull a BusyBox image from the Docker hub via Artifactory.

Success. Listing the images shows our newly downloaded image. Note that it was retagged on the fly to the fact that it was actually downloaded from Artifactory and not directly from the Docker hub. We can see the image in the docker-remote-cache repository in Artifactory as well.

Pushing a Docker Image

Now let’s try to push an image to a local repository. Again, the Set Me Up button is our best friend. You can see that we need to run two commands: Re-tag the image to reflect its target repository and then execute the push. We need to consult the documentation again to check how NGINX maps the docker-dev-local repository. Here it is: mapped to port 5002.

We are tagging the BusyBox image to the new port. Images list reflects the fact that the image has two tags now. Now let’s push the image. Looks good. Let’s check whether the image is in Artifactory as we expect it to be. Here you go. The image is indeed in Docker dev local repository.

JFrog Artifactory, Docker Registry and Universal Artifact Repository

This concludes our Docker setup screencast. You can use JFrog Artifactory to run Java builds with Maven, Gradle, Ivy, and Ant, and work with packaging systems of other development platforms like Nuget, RubyGems, or NPM. Artifactory also offers tight integration with Jenkins, Hudson, TeamCity, Bamboo, or any other CI server. Artifactory is also a great artifact repository for your dev ops needs since it natively supports managing Docker images, Vagrant images, as well as RPM and Debian packaging managers.