Setup up a browser in Docker container to use external proxy
2023-01-05
command line
Start the container with the
-e
flag, which allows you to set environment variables inside the container.Set the
HTTP_PROXY
andHTTPS_PROXY
environment variables to the URL of the external proxy.
1 | docker run -e HTTP_PROXY=http://myproxy.com:8080 -e HTTPS_PROXY=http://myproxy.com:8080 my-browser |
docker-compose.yml
Set the environment
variable for the service to include the HTTP_PROXY
and HTTPS_PROXY
variables, set to the URL of the external proxy.
1 | services: |
config in browser (in container)
1 | 192.168.100.1:7890 |