This method leverages Docker volumes for data persistence, which is often a good practice for single-node production environments. It is a variation of the manual installation.
Create JFrog Home Directory and Set
JFROG_HOMEVariableCreate Dedicated Directory:
Create a dedicated directory for your JFrog installation. This can be any directory of your choice (for example,
/app/jfrog,/usr/local/jfrog, or a custom path).# Replace <path to your directory> with your chosen directory sudo mkdir -p <path to your directory> cd <path to your directory>
Set
JFROG_HOMEVariable:Set the
JFROG_HOMEenvironment variable to easily refer to this path in your terminal. This must match the directory you created in the previous step.# Replace <path to your directory> with your chosen directory export JFROG_HOME=<path to your directory>
For more information, see JFrog Product Directory Structure.
Download and Extract the Artifactory Docker Compose Archive:
Download the Artifactory Docker Compose Package:
Download the specific Artifactory Docker Compose package you wish to install. To download a specific version, replace
[RELEASE]with the exact version number (for example,7.111.11) in the command below:curl -g -L -O -J 'https://releases.jfrog.io/artifactory/artifactory-<pro|oss|jcr|cpp-ce>/org/artifactory/<pro|oss|jcr|cpp-ce>/docker/jfrog-artifactory-<pro|oss|jcr|cpp-ce>/[RELEASE]/jfrog-artifactory-<pro|oss|jcr|cpp-ce>-[RELEASE]-compose.tar.gz' # For example, to download Artifactory Pro 7.111.11: curl -g -L -O -J 'https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/docker/jfrog-artifactory-pro/7.111.11/jfrog-artifactory-pro-7.111.11-compose.tar.gz'
Extract the Archive and Navigate:
Extract the contents of the downloaded compressed archive (
.tar.gzfile) and then navigate into the extracted folder.tar -xvf jfrog-artifactory-<pro|oss|jcr|cpp-ce>-<version>-compose.tar.gz # Example: # tar -xvf jfrog-artifactory-pro-7.111.11-compose.tar.gz # Navigate into the extracted folder cd artifactory-<pro|oss|jcr|cpp-ce>-<version>/
Note
An
.envfile is included within the Docker Compose archive. This file is used by Docker Compose and is updated during installations and upgrades. Some operating systems do not display dot files by default. If you make any changes to this file, remember to back it up before an upgrade.Create Docker Volumes and Configure Docker Compose
Create Docker Volumes:
Create named Docker volumes to manage Artifactory's data and, if applicable, the PostgreSQL data.
docker volume create --name=artifactory_data # Only if using PostgreSQL managed by Docker Compose docker volume create --name=postgres_data
Copy Docker Compose Volume Template:
Copy the
docker-compose-volumes.yamltemplate to your current extracted directory and rename it todocker-compose.yaml.cp templates/docker-compose-volumes.yaml docker-compose.yaml
Update the
.envFile:Add entries to the
.envfile for node identification. Avoid adding duplicate entries.echo -e "JF_SHARED_NODE_IP=$(hostname -i)" >> .env echo -e "JF_SHARED_NODE_ID=$(hostname -s)" >> .env echo -e "JF_SHARED_NODE_NAME=$(hostname -s)" >> .env
Follow the steps mentioned in Docker Compose Next Steps to complete the setup.