Artifactory One Minute Setup – Docker registry as container install
Install Artifactory as your on-prem 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.
Spin up your Artifactory docker registry with this simple command:
curl -L ‘https://bintray.com/api/v1/content/jfrog/run/art-compose/$latest/art-compose?bt_package=art-compose’ | sudo bash
For more details on setting up your Docker registry, please refer to the JFrog Artifactory user guide.
Get started for Free>
Setup Artifactory as Docker registry
This demo will show you how to set up Artifactory as a Docker registry and start using it in less than one minute.
JFrog Artifactory is a universal artifact repository manager. It fully supports software packages created by any language or technology. It works with different build tools, CI servers, and packaging systems.
Artifactory can be easily used as a Docker registry, either as a SaaS service, simply installed and setup using Docker Compose, or configured on an existing Artifactory server.
For this screencast we will demonstrate the one minute setup with Docker Compose.
The compose that pulls containers for Artifactory, NGINX and Postgres and pre-configure all the required settings with defaults to have your Docker registry up and running.
Once you have Artifactory up and running you can alter this configuration for your needs.
Download and install
Let’s download the installer and run it.
Notice that all images are being pulled from JFrog Bintray – the universal distribution platform! …and go!
After downloading all the container layers, we’re all set!
Let’s open our browser to the Artifactory home page.
When first launched, the Artifactory setup wizard will pop-up. This wizard will easily walk us through the setup process.
The first step is to provide a license key, simply paste it here. This can be either a trial or your permanent license.
We will skip the password change and keep the original one, “password”.
We will also skip the proxy configuration, this is used for advanced intranet configuration, and can be revised later on if necessary.
Now we can choose which types of repositories we would like to set up. As a universal repository manager, Artifactory supports a great list of technologies out of the box. We will choose Docker only.
…and done!
Artifactory can be used as a local proxy for Docker registries. It can also host and serve docker images, which are directly pushed to Artifactory.
The setup wizard creates three Docker repositories in Artifactory.
A local repository called docker-local, where you can deploy and serve your own Docker images.
A remote repository called docker-remote, which is a caching proxy for Docker Hub and serves as a proxy for other docker registries.
Finally, a virtual repository called docker, which aggregates the other two repositories, allowing you to work with a single access point to all your required containers.
You can of course modify these or create additional Docker repositories later on, using the repositories administration pages.
Let’s explore the shiny user interface. You can see the list of repositories we just created, including useful information at your fingertips.
Pull docker image with Artifactory as Docker registry
Now it’s time to configure the Docker client to work with Artifactory.
Let’s start working with Artifactory by pulling an image from Docker Hub via the Artifactory remote repository.
In order for the Docker client to be familiar with the Artifactory server and its docker virtual repo that we just set up, we will define the domain name in our local /etc/hosts file.
In a production installation, this configuration is done on the network DNS..
Let’s login to Docker using the default admin and password credentials. OK. We successfully logged-in. Now we can pull a sample image, such as NGINX from Docker Hub via Artifactory.
Here it is!
Listing the images shows our newly downloaded image. Note that it was re-tagged on the fly because it was actually downloaded from Artifactory and not directly from Docker Hub.
We can see the image in the Docker-remote-cache repository in Artifactory as well, and we can also see the Docker info.
Push docker image with Artifactory as Docker registry
Now, let’s push an image to our local repository. First, lets pull a sample hello-world image
Now we’ll login to our registry using the Docker login command. We will tag the hello-world image to the new docker.artifactory repository, with a new 2.0 tag.
We can see that the 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 is the cached hello-world image that we pulled.
Here is the newly tagged image in our local Docker repository.
This concludes our Docker registry setup screencast.
JFrog Artifactory – A Docker registry and a universal repository manager
You can use Artifactory to work with any build technology like Maven, Gradle, Ivy, Conan and Ant and manage your artifacts for all your technologies, just to name few: Java, Docker, Debian, NuGet, RubyGems, NPM and many more. Artifactory also offers tight integration with Jenkins, Hudson, TeamCity, Bamboo, or any other CI server.
This concludes our introductory one-minute Artifactory setup. You’re welcome to visit our user guide to discover more features.