Skip to content

Docker Repositories in JFrog Artifactory

โ† Back to JFrog Tutorials


JFrog Artifactory is a fully OCI-compliant Docker registry. You can push, pull, and proxy Docker images through Artifactory โ€” eliminating direct DockerHub dependency, avoiding pull rate limits, and keeping all images in a controlled registry.

All steps use JFrog SaaS at https://<company>.jfrog.io.


What You'll Build

docker-dev-local       [LOCAL]  โ†’ images built by CI (dev/feature builds)
docker-prod-local      [LOCAL]  โ†’ promoted production-ready images
dockerhub-remote       [REMOTE] โ†’ proxy of DockerHub (avoid rate limits)
docker-virtual         [VIRTUAL]โ†’ single registry URL for all consumers

Step 1: Create Local Repository โ€” Dev Builds

  1. Go to Administration โ†’ Repositories โ†’ + New Repository
  2. Select Local
  3. Choose Docker
  4. Set Repository Key: docker-dev-local
  5. Click Create Local Repository

Step 2: Create Local Repository โ€” Production Images

  1. Repeat โ€” set Repository Key: docker-prod-local
  2. Click Create Local Repository

Why Two Docker Local Repos?

Repo Purpose Who promotes here
docker-dev-local Feature branch builds, CI builds CI pipeline on every commit
docker-prod-local Vetted, security-scanned images Promotion pipeline after approval

Step 3: Create Remote Repository โ€” DockerHub Proxy

Without this, every docker pull hits DockerHub and counts against rate limits (100 pulls/6h for unauthenticated users).

  1. Go to Administration โ†’ Repositories โ†’ + New Repository
  2. Select Remote
  3. Choose Docker
  4. Set Repository Key: dockerhub-remote
  5. Set URL: https://registry-1.docker.io
  6. (Optional) Add DockerHub credentials under Advanced โ†’ Authentication to increase rate limits
  7. Click Create Remote Repository

Step 4: Create Virtual Repository

  1. Go to Administration โ†’ Repositories โ†’ + New Repository
  2. Select Virtual
  3. Choose Docker
  4. Set Repository Key: docker-virtual
  5. Add repositories in order:
  6. docker-prod-local
  7. docker-dev-local
  8. dockerhub-remote
  9. Click Create Virtual Repository

Step 5: Push a Docker Image to JFrog SaaS

Log in to JFrog Docker Registry

docker login <company>.jfrog.io \
  --username your-username \
  --password your-access-token

Tag and Push an Image

# Tag your local image with the JFrog SaaS registry
docker tag my-app:latest <company>.jfrog.io/docker-dev-local/my-app:1.0.0

# Push to JFrog
docker push <company>.jfrog.io/docker-dev-local/my-app:1.0.0

Step 6: Pull an Image from JFrog SaaS

Pull your own image:

docker pull <company>.jfrog.io/docker-virtual/my-app:1.0.0

Pull a DockerHub image via JFrog proxy (avoid rate limits):

# Instead of: docker pull nginx:latest
docker pull <company>.jfrog.io/docker-virtual/nginx:latest

Artifactory checks dockerhub-remote โ†’ fetches from DockerHub โ†’ caches โ†’ returns image. Next pull is served from cache.


Step 7: Configure Docker Daemon (Optional โ€” Pull via Virtual)

To avoid typing the full JFrog URL every time, configure Docker to use JFrog as a registry mirror:

Edit /etc/docker/daemon.json:

{
  "registry-mirrors": ["https://<company>.jfrog.io/docker-virtual"]
}

Restart Docker:

sudo systemctl restart docker

Repository Comparison Summary

Feature Local Remote Virtual
Store your built images โœ… โŒ โŒ
Proxy DockerHub (cache) โŒ โœ… โŒ
Single registry endpoint โŒ โŒ โœ…
Push target for CI โœ… โŒ Delegates to local
Pull target for devs โœ… โœ… โœ… (best choice)
Avoids DockerHub rate limits โŒ โœ… โœ… (via remote)

Use Cases

Scenario Solution
CI builds Docker image on every commit Push to docker-dev-local
Security-scanned image approved for production Promote to docker-prod-local
Developer pulls nginx:latest Routed via dockerhub-remote proxy โ€” cached in JFrog
Avoid DockerHub rate limit failures in CI Configure all docker pull to use docker-virtual
Single registry config for whole team Point .docker/config.json at docker-virtual

Next Steps

๐Ÿ‘‰ npm Repositories ๐Ÿ‘‰ Build Info & Promotion


๐Ÿง  Quick Quiz

#

What is the main reason to create a Remote Docker repository in JFrog Artifactory for DockerHub?


๐Ÿ“ฌ DevopsPilot Weekly โ€” Learn DevOps, Cloud & Gen AI the simple way.
๐Ÿ‘‰ Subscribe here