Skip to main content

Service Proxies

Dagger can be configured to use HTTP(S) proxies to connect to external HTTP services. This configuration applies to "core" operations like pulling container images, cloning Git repositories, etc. and is also supplied to user containers in the form of standard environment variables.

The engine supports the following standard environment variables:

  • HTTP_PROXY
  • HTTPS_PROXY
  • NO_PROXY
  • ALL_PROXY
  • FTP_PROXY

Configuring Dagger with these settings currently requires provisioning a custom engine.

To be applied, one or more of the environment variables listed above just need to be set on the custom Dagger container.

Configuration applied to user containers

As mentioned above, these proxy environment variables set on Dagger will also be automatically set on all containers created by userspace Dagger Functions (i.e. containers created via a withExec API call).

This is useful so that Dagger code you are not in direct control of (e.g. an external module dependency) does not need to be forked and updated to use your proxies in order to operate in your network where those proxy settings may be strictly required.

The values of these environment variables do not impact the caching of those containers and are not persisted in Dagger's cache. Changing the value of the settings won't invalidate the cache of the container's execution.

Additionally, if the withEnvVariable API is used to explicitly set any of those proxy environment variable values, those will override any settings inherited from Dagger's proxy configuration.