Skip to content

Scalingo/scalingo-docker-registry-proxy-cache

Repository files navigation

Build with bake

docker buildx bake --file docker-bake.hcl

Create .env file

cp .env.sample .env
vim .env

Run with docker

docker run --name openresty_docker_registry_proxy \
  --rm -it \
  -p 3128:3128 \
  -v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
  -v $(pwd)/certs:/certs \
  --env-file .env \
  docker-registry-proxy-cache:latest

Run with docker compose

docker compose up

The HTPASSWD environment variable activates basic authentication. In this example, we define two users:

  • user1:user1
  • user2:user2

The HTPASSWD_DELIMITER environment variable can be used to specify a custom delimiter. By default, a space is used.

By default, generate-certificate.sh generates a self-signed certificate. You can override this by mounting a volume with your own certificates at /certs.

  • server.crt
  • server.key

Configure docker to use a proxy

{
  ...
  "proxies": {
    "http-proxy": "http://user1:[email protected]:3128",
    "https-proxy": "http://user1:[email protected]:3128"
  },
  "insecure-registries" : ["own-registry.sample.com:443"]
}

The insecure-registries setting should be configured if your proxy is using an invalid or self-signed certificate.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published