Step 2: Add Repositories and Artifacts

JFrog Hosting Models Documentation

Content Type
User Guide

This step will walk you through creating a Docker repository type and uploading your container images, allowing you to use Artifactory as your Docker Registry. You can then follow the instructions to create other types of repositories for additional binaries out of the 27 supported technologies such as npm, Maven, Go, and others.

  1. Navigate to the Administration Module. Expand the Repositoriesmenu and click on the Repositoriesmenu item.

    Administration module Repositories menu.png
  2. Create 3 new Docker package type repositories:

    1. Add a new Local Repository with theRepository Key “docker-quickstart-local” and keep the rest of the default settings.

    2. Click on the Remote tab and add a new Remote Repository with the Repository Key “docker-quickstart-remote” and keep the rest of the default settings.

    3. Click on theVirtualtab and add a new Virtual Repository with the Repository Key “docker-quickstart”.

      1. Add the local and remote Docker repositories you just created.

      2. Select your local repository as the Default Deployment RepositoryDeploy to a Virtual Repository and keep the rest of the default settings.


        When creating your remote and virtual repositories, you’ll see a pop-up window with some basic Docker commands. Copy these commands for future use. You’ll also need yourserver nameandrepositoryin the next steps.

  3. Fork the JFrog Project Examples GitHub repository. Here you will find the JFrog QuickStart example GitHub repository, containing a simple Dockerfile that you will use to build your custom image.

  4. Update the base image reference.

    1. Clone your forked repository and update the FROM line of the Dockerfile to reference your virtual Docker repository.

      FROM ${SERVER_NAME}${VIRTUAL_REPO_NAME}/ubuntu:16.04


      The SERVER_NAME is the first part of the URL given to you for your environment:

      The VIRTUAL_REPO_NAME is the name “docker-quickstart” that you assigned to your virtual repository in the steps above.

  5. Using the following commands, log in to your virtual repository“docker-quickstart”, build, tag and push your custom image to your Docker repository:

    $ docker login ${SERVER_NAME}
    $ docker build --tag ${SERVER_NAME}${VIRTUAL_REPO_NAME}/my-docker-image:latest .
    $ docker push ${SERVER_NAME}${VIRTUAL_REPO_NAME}/my-docker-image:latest
  6. Navigate to the Application Module, in the Platform UI, expand the Artifactory menu and click the Artifacts menu item. Here you’ll be able to see the details of your new artifacts.

    Details of your new artifacts.png