How do you run `apt-get` in a dockerfile behind a proxy?
I am running a virtual machine (Ubuntu 13.10) with docker (version 0.8.1, build a1598d1). I am trying to build an image with a dockerfile. First, I want to update the packages (using the code below - the proxy is obfuscated) but apt-get times out with the error: Could not resolve 'archive.ubuntu.com' . FROM ubuntu:13.10 ENV HTTP_PROXY <HTTP_PROXY> ENV HTTPS_PROXY <HTTPS_PROXY> RUN export http_proxy=$HTTP_PROXY RUN export https_proxy=$HTTPS_PROXY RUN apt-get update && apt-get upgrade I have also run the following in the host system: sudo HTTP_PROXY=http://<PROXY_DETAILS>/ docker -d & The host