Docker Registry
What is Docker Registry?
Docker Registry (also called Distribution) is the official open-source server for storing and distributing Docker images. Running your own instance lets you push and pull images without relying on Docker Hub or a paid registry service, useful for private images, air-gapped environments, or CI pipelines that need a local cache. Laradock builds it from the official registry:2 image.
Start Docker Registry
docker compose up -d docker-registry
Stop Docker Registry
docker compose stop docker-registry
This stops the container without deleting its data. To remove the container (data on disk is untouched, it lives under DATA_PATH_HOST/docker-registry): docker compose rm -f docker-registry.
Configuration
All settings live in docker-registry/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
DOCKER_REGISTRY_PORT | 5000 | Host-side port the registry's HTTP API is published on (host:5000). |
That's the only variable Laradock exposes; everything else is the stock registry:2 image behavior.
Push and pull images
The registry stores image data under DATA_PATH_HOST/docker-registry on your host (mounted to /var/lib/registry in the container), so images survive container restarts and rebuilds.
From your host machine (registry reachable on localhost:5000 by default):
docker tag your-image:latest localhost:5000/your-image:latest
docker push localhost:5000/your-image:latest
docker pull localhost:5000/your-image:latest
From another container on Laradock's backend network, use the container name instead of localhost: docker-registry:5000.
Common issues
http: server gave HTTP response to HTTPS client. The stock registry image serves plain HTTP, not HTTPS. Docker's client refuses to push/pull over HTTP to a registry it doesn't considerlocalhostby default. If you're hitting it from another machine or a non-localhosthostname, add it to your Docker daemon'sinsecure-registrieslist.- Port already in use on your host. Another local registry (or another Laradock project) is already bound to
5000. ChangeDOCKER_REGISTRY_PORTin.envand restart. - Pushed images disappear after a rebuild. Confirm
DATA_PATH_HOSTdidn't change between runs. The registry's storage is bind-mounted from your host, so a differentDATA_PATH_HOSTmeans a different (empty) image store. - Two Laradock projects overwrite each other's images. Running more than one Laradock on the same machine? Set both
COMPOSE_PROJECT_NAMEandDATA_PATH_HOSTto unique values per project, otherwise they share the same registry data on disk.
Need to build and run Docker-in-Docker for CI-style workflows? See Docker in Docker. New to Laradock? Start at Getting Started.