kemonine
/
lollipopcloud
Archived
1
0
Fork 0
This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
lollipopcloud/armbian/docker_registry.md

37 lines
1.2 KiB
Markdown

https://github.com/docker/distribution
https://github.com/docker/docker.github.io/blob/master/registry/deploying.md
https://stackoverflow.com/questions/24309526/how-to-change-the-docker-image-installation-directory
Prereq : Docker installed
Prereq : Docker config
/etc/docker/daemon.json
graph: /tank/docker/graph
docker info | grep "Docker Root Dir"
docker pull ubuntu:16.04 # pull from hub
docker tag ubuntu:16.04 localhost:5000/my-ubuntu # tag for registry
docker push localhost:5000/my-ubuntu # push to registry
docker image remove ubuntu:16.04 # nuke local cache
docker image remove localhost:5000/my-ubuntu # nuke local cached
docker pull localhost:5000/my-ubuntu # pull from registry
docker run --name registry \
--restart unless-stopped \\
-p 5000:5000 \
-e TZ=UTC \\
-e DEBUG=1 \\
-e REGISTRY_HTTP_ADDR=0.0.0.0:5000 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
-e REGISTRY_AUTH=htpasswd \
-e REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
-v /path/data:/var/lib/registry
-v /path/certs:/certs
-v /path/auth:/auth
registry/registry:$tag