Docker/OCI Registry Guide
Artifact Keeper provides a fully compliant OCI Distribution Specification registry for Docker and other container images.
Endpoint
All Docker/OCI operations use the /v2 endpoint, which implements the OCI Distribution Specification.
http://localhost:8080/v2Configuration
Docker Login
Authenticate with your Artifact Keeper instance:
docker login localhost:8080Enter your Artifact Keeper username and password when prompted.
Alternative: Token Authentication
You can also authenticate using a token:
echo $ARTIFACT_KEEPER_TOKEN | docker login localhost:8080 -u username --password-stdinPushing Images
Tag Your Image
First, tag your image with the Artifact Keeper registry URL:
docker tag myapp:latest localhost:8080/myapp:latestdocker tag myapp:latest localhost:8080/myapp:1.0.0Push to Registry
Push your tagged images:
docker push localhost:8080/myapp:latestdocker push localhost:8080/myapp:1.0.0Pulling Images
Pull images from your Artifact Keeper registry:
docker pull localhost:8080/myapp:latestdocker pull localhost:8080/myapp:1.0.0Multi-Architecture Images
Artifact Keeper supports multi-architecture manifests for cross-platform container images.
Create Multi-Arch Manifest
# Build for multiple architecturesdocker buildx build --platform linux/amd64,linux/arm64 \ -t localhost:8080/myapp:1.0.0 \ --push .Inspect Manifests
docker manifest inspect localhost:8080/myapp:1.0.0Tag Management
List Tags
Use the OCI API to list all tags for an image:
curl http://localhost:8080/v2/myapp/tags/listResponse:
{ "name": "myapp", "tags": ["latest", "1.0.0", "1.0.1"]}Delete Tags
Delete a specific tag:
# Get the digestDIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' localhost:8080/myapp:1.0.0 | cut -d@ -f2)
# Delete by digestcurl -X DELETE http://localhost:8080/v2/myapp/manifests/$DIGESTRepository Namespacing
Organize images using repository paths:
# Push to namespaced repositorydocker tag myapp:latest localhost:8080/team/project/myapp:latestdocker push localhost:8080/team/project/myapp:latest
# Pull from namespaced repositorydocker pull localhost:8080/team/project/myapp:latestBest Practices
Use Semantic Versioning
Tag images with semantic versions for better tracking:
docker tag myapp:latest localhost:8080/myapp:1.2.3docker push localhost:8080/myapp:1.2.3Immutable Tags
Avoid overwriting existing tags. Use unique version tags for each build:
# Good: unique versiondocker push localhost:8080/myapp:1.2.3-build.42
# Avoid: reusing same tagdocker push localhost:8080/myapp:latest # overwrites previous latestLayer Caching
Artifact Keeper deduplicates image layers across repositories, saving storage space automatically.
Integration with CI/CD
GitHub Actions Example
name: Build and Pushon: [push]
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Login to Artifact Keeper uses: docker/login-action@v3 with: registry: registry.example.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push uses: docker/build-push-action@v5 with: push: true tags: | registry.example.com/myapp:latest registry.example.com/myapp:${{ github.sha }}GitLab CI Example
build: stage: build image: docker:latest services: - docker:dind before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.example.com script: - docker build -t registry.example.com/myapp:$CI_COMMIT_SHA . - docker push registry.example.com/myapp:$CI_COMMIT_SHATroubleshooting
TLS Certificate Errors
If using self-signed certificates, configure Docker to trust them:
# Add certificate to Dockersudo mkdir -p /etc/docker/certs.d/localhost:8080sudo cp ca.crt /etc/docker/certs.d/localhost:8080/ca.crtsudo systemctl restart dockerOr use insecure registry (development only):
{ "insecure-registries": ["localhost:8080"]}Authentication Failures
Verify credentials and token expiration:
# Check authenticationcurl -u username:password http://localhost:8080/v2/Expected response: {}
Storage Issues
Monitor available storage space and configure retention policies in Artifact Keeper to automatically clean up old images.
Advanced Features
Content Addressability
All images are stored by their SHA256 digest, ensuring integrity:
# Pull by digest for reproducible buildsdocker pull localhost:8080/myapp@sha256:abc123...Garbage Collection
Artifact Keeper automatically removes unreferenced layers. Configure cleanup policies in the admin UI.
Rate Limiting
Configure rate limits per user or repository to prevent abuse:
# Check rate limit headerscurl -I http://localhost:8080/v2/myapp/manifests/latestSee Also
- Security Scanning - Automatic vulnerability scanning for container images
- Artifact Signing - Sign and verify container images with cosign
- Security Policies - Configure policies to block vulnerable images