Getting started with Docker and your self-hosted Artifactory Pro installation using the path method involves four basic steps:
To configure Artifactory and your reverse proxy using the path method, carry out the following steps:
Create your Virtual Docker Repositories (as well as a local and remote Docker repository that it should aggregate). In our example below we will use a repository named docker-virtual.
Make sure you have a reverse proxy server up and running.
Obtain a valid SSL certificate or use a self-signed certificate. To create a self-signed certificate, you can follow these instructions for Ubuntu.
Make sure your certificate matches the Artifactory hostname used in your reverse proxy configuration. In our example below we will use art.local.
Artifactory's can generate your complete reverse proxy configuration file for supported servers.
Go to Reverse Proxy Configuration Generator and fill in the fields in according to how your reverse proxy is set up while making sure to:
NginxCopy the code snippet generated by the configuration generator into your
artifactory-nginx.conf file, and place it in your
Create the following symbolic link.
sudo ln -s /etc/nginx/sites-available/artifactory-nginx.conf /etc/nginx/sites-enabled/artifactory-nginx.conf
Copy the code snippet generated by the configuration generator into your
artifactory-apache.conf file and place it in your
Create the following symbolic link:
sudo ln -s /etc/apache2/sites-available/artifactory-apache.conf /etc/apache2/sites-enabled/artifactory-apache.conf
To configure your Docker client, carry out the following steps
Add the following to your DNS or to the client's
Since the certificate is self-signed, you need to import it to your Docker certificate trust store as described in the Docker documentation. Alternatively, you can configure the Docker client to work with an insecure registry as described in the Docker documentation.
Restart your Docker daemon/engine to apply the insecure registry flag (if self-signed certificate is imported, you do not need to restart the Docker daemon/engine).
To verify your reverse proxy is configured correctly, run the following command making sure that the return code is 200:
curl -I -k -v https://<artifactory url>/api/system/ping
Run the following commands to ensure your proxy configuration is functional and can communicate with Artifactory:
Pull the "hello-world" image
docker pull hello-world
Login to repository docker-virtual
docker login art.local
Tag the "hello-world" image
docker tag hello-world art.local/docker-virtual/hello-world
Push the tagged "hello-world" image to docker-virtual
docker push art.local/docker-virtual/hello-world