Using the latest version?
JFrog Container Registry Guide

Skip to end of metadata
Go to start of metadata


Make sure you have reviewed the overall installation process

Before you proceed with the instructions on this page, make sure you have reviewed the whole installation procedure as described in Installing JFrog Container Registry.

JFrog Container Registry Docker images can be pulled from Bintray and run as a Docker container.

To do this, you need to have Docker client properly installed and configured on your machine. For details about installing and using Docker, please refer to the Docker documentation.

Page Contents


Running JFrog Container Registry as a Container on Docker

Running JFrog Container Registry as a container is simple and straightforward, and involves the following basic steps:

Since the JFrog Container Registry instance running in a Docker container is mutable, all data and configuration files will be lost once the container is removed. If you want your data to persist (for example when upgrading to a new version), you should also follow the next step.

Step 1: Pulling the JFrog Container Registry Docker Image

The JFrog Container Registry Docker image may be pulled from Bintray by executing the corresponding Docker command below:

Pulling the JFrog Container Registry Docker Image
docker pull

Step 2: Running a JFrog Container Registry Container

You can list the Docker images you have downloaded using the docker images command, which should display something like the following output:

$ docker images
REPOSITORY                                 TAG                 IMAGE ID            CREATED             SIZE    latest 		       da70b82904e7        2 days ago          861.5 MB

To start a JFrog Container Registry container, use the corresponding command:

Running JFrog Container Registry in a container
$ docker run --name artifactory -d -p 8081:8081    

Step 3: Accessing JFrog Container Registry

Once the JFrog Container Registry container is up and running, you access JFrog Container Registry in the usual way by browsing to: 


Special Settings

Setting Java Memory Parameters

To control the memory used by JFrog Container Registry, you can pass the environment variable EXTRA_JAVA_OPTIONS.

For example:

Passing JVM memory to Artifactory Docker container
$ docker run --name artifactory -d -p 8081:8081 -e EXTRA_JAVA_OPTIONS='-Xms512m -Xmx2g -Xss256k -XX:+UseG1GC'    

Supported Environment Variables

JFrog Container Registry Docker images can be customized using environment variables.

Pass the values as environment variables with your Docker execution command.

For example:

docker run -d --name art -e SERVER_XML_ARTIFACTORY_MAX_THREADS=500 -p 8081:8081

JFrog Container Registry will start with maxThreads set to "500" in the Tomcat server.xml.

Java system properties

You can pass Java system properties to the JVM running JFrog Container Registry

Pass Java options to JFrog Container Registry JVM


The database environment variables are documented in Changing the Database page.

Tomcat Server.xml

Sets the custom JFrog Container Registry port.8081
Sets the custom JFrog Container Registry maxThreads.200
sets the custom Access maxThreads.50
Adds an extra JFrog Container Registry connector config.
Adds an extra Access connector config
Add another connector to Tomcat. For example to support SSL.

Managing Data Persistence

For your data and configuration to remain once the JFrog Container Registry Docker container is removed, you need to store them on an external volume mounted to the Docker container. There are two ways to do this:

  • Using Host Directories
  • Using a Docker Named Volume

Using Host Directories

The external volume is a directory in your host's file system (such as /var/opt/jfrog/artifactory). When you pass this to the docker run command, the JFrog Container Registry process will use it to read configuration and store its data.

To mount the above example, you would use the following command:

$ docker run --name artifactory-jcr -d -v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory -p 8081:8081

This mounts the /var/opt/jfrog/artifactory directory on your host machine to the container's /var/opt/jfrog/artifactory and will then be used by JFrog Container Registry for configuration and data.

Using a Docker Named Volume

In this case, you create a docker named volume and pass it to the container. By default, the named volume is a local directory under /var/lib/docker/volumes/<name>, but can be set to work with other locations. For more details, please refer to the Docker documentation for  Docker Volumes.

The example below creates a Docker named volume called artifactory_data and mounts it to the JFrog Container Registry container under /var/opt/jfrog/artifactory:

$ docker volume create --name artifactory6_data
$ docker run --name artifactory-jcr -d -v artifactory6_data:/var/opt/jfrog/artifactory -p 8081:8081

In this case, even if the container is stopped and removed, the volume persists and can be attached to a new running container using the above docker run command. 

Extra Configuration Directory

You can mount extra configuration files, such as binarystore.xml, artifactory.lic or, that are needed for your JFrog Container Registry installation.
To do this, you need to mount the file or directory on the host into the JFrog Container Registry Docker container's /artifactory_extra_conf folder. When the JFrog Container Registry Docker container starts, it will copy the files from /artifactory_extra_conf to ARTIFACTORY_HOME/etc (usually /var/opt/jfrog/artifactory/etc).

The files mounted into /artifactory_extra_conf will be copied over to ARTIFACTORY_HOME/etc every time the container starts, so you should avoid modifying the files in ARTIFACTORY_HOME/etc.

Example 1: Passing in a custom file

$ docker run --name artifactory-jcr -d -v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory -v /conf/ -p 8081:8081

Example 2: Passing in a custom binarystore.xml

$ docker run --name artifactory-jcr -d -v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory -v /conf/binarystore.xml:/artifactory_extra_conf/binarystore.xml -p 8081:8081

Running JFrog Container Registry Docker with a Custom User/Group ID

JFrog Container Registry Docker container can be configured to run with a custom user/group ID by passing the following parameter: "--user $uid:$gid".

The mounted host directory must be writable by the given user id.

The following example will get JFrog Container Registry running as user ID 1234 and Group ID 4321.

$ docker run --name artifactory-jcr --user 1234:4321 -d -v /var/opt/jfrog/artifactory:/var/opt/jfrog/artifactory -p 8081:8081

Running JFrog Container Registry With a Different Database

By default, JFrog Container Registry runs with an embedded Derby Database that comes built-in, however, JFrog Container Registry supports additional databases. To switch to one of the other supported databases, please refer to Changing the Database

  • No labels