Docker Repositories in JFrog Artifactory¶
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¶
- Go to Administration โ Repositories โ + New Repository
- Select Local
- Choose Docker
- Set Repository Key:
docker-dev-local - Click Create Local Repository
Step 2: Create Local Repository โ Production Images¶
- Repeat โ set Repository Key:
docker-prod-local - 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).
- Go to Administration โ Repositories โ + New Repository
- Select Remote
- Choose Docker
- Set Repository Key:
dockerhub-remote - Set URL:
https://registry-1.docker.io - (Optional) Add DockerHub credentials under Advanced โ Authentication to increase rate limits
- Click Create Remote Repository
Step 4: Create Virtual Repository¶
- Go to Administration โ Repositories โ + New Repository
- Select Virtual
- Choose Docker
- Set Repository Key:
docker-virtual - Add repositories in order:
docker-prod-localdocker-dev-localdockerhub-remote- 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