diff --git a/README.md b/README.md index bf21147..cd41a5f 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,9 @@ We run our own private registry on a server with limited storage and it was only ``` +## Proxy +To access the target registry via proxy, set proxy environment variable(s) as described by Golang's [net/http package](https://pkg.go.dev/net/http#ProxyFromEnvironment). + ## Registry preparation Deckschrubber uses the Docker Registry API. Its delete endpoint is disabled by default, you have to enable it with the following entry in the registry configuration file: diff --git a/util/basicauthtransport.go b/util/basicauthtransport.go index 1567e99..93d2310 100644 --- a/util/basicauthtransport.go +++ b/util/basicauthtransport.go @@ -25,6 +25,7 @@ func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error func NewBasicAuthTransport(URL string, uname string, passwd string, insecure bool) *BasicAuthTransport { baseTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: insecure}, }