Set Up Proxy for Docker Registry
This tutorial explains how to access docker registry via proxy for docker related CI/CD jobs:
-
Set up proxy for docker daemon on machines running docker related CI/CD steps
For docker related CI/CD steps, follow this guide to set up proxy for docker daemon on machines running these steps. Do not forget to specify protocol part of the proxy server when configure related proxy entries, for instance:
HTTPS_PROXY=http://proxy.example.com:3128 -
Set up proxy for step Build Image
This step calls docker buildx builder to do the job, so you also need to enable proxy for corresponding buildx builder on machines running this step, besides setting up proxy for docker daemon. The procedure is the same as insecure docker registry, except that you will need to use option
--driver-optto pass in proxy environments when create the builder, for instance:--driver-opt env.https_proxy=http://proxy.example.com:3128 -
Set up proxy for step Build Image (Kaniko), Pull Image, or Push Image
Besides setting up proxy for docker deamon, you also need to use environment variables to set up proxy for these steps. To do it, edit the step and add related environments in more settings, for instance:
HTTPS_PROXY=http://proxy.example.com:3128