Manual Docker Compose Installation

JFrog Installation & Setup Documentation

Content Type
Installation & Setup

This method provides full manual control over folder structure and permissions, making it suitable for advanced users or specific environments.

  1. Create JFrog Home Directory and Set JFROG_HOME Variable

    1. Create 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> 
    2. Set JFROG_HOME Variable:

      Set the JFROG_HOME environment 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.

  2. Download and Extract the Artifactory Docker Compose Archive:

    1. 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'
    2. Extract the Archive and Navigate:

      Extract the contents of the downloaded compressed archive (.tar.gz file) 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 .env file 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.

  3. Manual Folder Setup and Docker Compose Configuration

    1. Create Folder Structure and Set Ownership:

      Create the necessary folder structure under your chosen $JFROG_HOME and set the correct ownership for Docker containers.

      mkdir -p $JFROG_HOME/artifactory/var
      mkdir -p $JFROG_HOME/artifactory/var/data
      mkdir -p $JFROG_HOME/artifactory/var/etc
      
      # Necessary if you plan to add Nginx via Docker Compose
      mkdir -p $JFROG_HOME/artifactory/var/data/nginx
      # Necessary if you plan to add PostgreSQL via Docker Compose
      mkdir -p $JFROG_HOME/artifactory/var/data/postgres

      Then, set the ownership (user ID 1030 and group ID 1030 are typical for Artifactory containers; adjust others as needed for PostgreSQL/Nginx).

      sudo chown -R 1030:1030 $JFROG_HOME/artifactory/var
      sudo chown -R 1030:1030 $JFROG_HOME/artifactory/var/data
      sudo chown -R 1030:1030 $JFROG_HOME/artifactory/var/etc
      sudo chown -R 104:107 $JFROG_HOME/artifactory/var/data/nginx  # For Nginx
      sudo chown -R 999:999 $JFROG_HOME/artifactory/var/data/postgres # For PostgreSQL
    2. Copy and Use Docker Compose Files:

      The docker-compose.yaml files are templates designed to be used together, not as a choice of one or the other. You should copy the necessary files from the templates folder to your main installation directory.

      You do not need to rename the files. Simply copy the ones you need to your main installation directory.

      Requirement

      Template

      Instructions

      Artifactory + Bundled Derby Database

      docker-compose.yaml

      This is the core template for a single-node installation with the default bundled database. You should always use this file.

      Artifactory + PostgreSQL

      docker-compose-postgres.yaml

      This file defines the PostgreSQL service. Use it in addition to the docker-compose.yaml file to use an external database.

      Artifactory + Nginx

      docker-compose-nginx.yaml

      This file defines the Nginx service. Use it in addition to the docker-compose.yaml file to add a reverse proxy.

    3. Update the .env File:

      Update the .env file with the installation directory.

      ROOT_DATA_DIR=$JFROG_HOME/artifactory
      ##Enter the exact value of $JFROG_HOME. For example, /root/.jfrog.
  4. Configure Host ID and IP for Container Installations:

    For Podman and other Container Installations, verify that the host's ID (shared.node.id) and IP (shared.node.ip) are explicitly added to the system.yaml. If these are not manually added, they are automatically resolved as the container's IP, meaning other nodes and services will not be able to reach this instance.

    shared:
      node:
        ip: host-ip # Actual IP of the host machine
        id: host-id
  5. Follow the steps mentioned in Docker Compose Next Steps to complete the setup.