diff --git a/.gitignore b/.gitignore index 69e8fcf..784dd72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .idea *.iml -docker_mirror_cache -docker_mirror_certs +**/docker_mirror_cache +**/docker_mirror_certs diff --git a/docs/compose/docker-compose.yml b/docs/compose/docker-compose.yml new file mode 100644 index 0000000..3dd8807 --- /dev/null +++ b/docs/compose/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.7' + +services: + docker_registry_proxy: + image: rpardini/docker-registry-proxy:0.6.0 # Check and make sure this is the last released version + env_file: # This contains REGISTRIES and AUTH_REGISTRIES + - ./secrets.env + environment: + - CACHE_MAX_SIZE=256g + - ENABLE_MANIFEST_CACHE=true + volumes: + # Format: :; adapt to your needs + - ./docker_mirror_cache:/docker_mirror_cache # This will be up to CACHE_MAX_SIZE big + - ./docker_mirror_certs:/ca + ports: + - 0.0.0.0:3128:3128 # 0.0.0.0 binds to all interfaces diff --git a/docs/compose/secrets.env b/docs/compose/secrets.env new file mode 100644 index 0000000..b996632 --- /dev/null +++ b/docs/compose/secrets.env @@ -0,0 +1,3 @@ +# DockerHub authentication +REGISTRIES="k8s.gcr.io gcr.io quay.io" # There is no need to specify auth.docker.io, it's built-in +AUTH_REGISTRIES="auth.docker.io:your_dockerhub_username:your_dockerhub_password"