Using the latest version?
JFrog Container Registry Guide
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:
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:
To start a JFrog Container Registry container, use the corresponding command:
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:
Setting Java Memory Parameters
To control the memory used by JFrog Container Registry, you can pass the environment variable EXTRA_JAVA_OPTIONS.
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.
docker run -d --name art -e SERVER_XML_ARTIFACTORY_MAX_THREADS=500 -p 8081:8081 docker.bintray.io/jfrog/artifactory-jcr
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.
|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:
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
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:
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
db.properties, 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
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
Example 1: Passing in a custom db.properties file
Example 2: Passing in a custom binarystore.xml
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.
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.