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 is able to run apt-get
without issue.
How can I change the dockerfile to allow it to reach the ubuntu servers from within the container?
Update
I ran the code in CentOS (changing the FROM ubuntu:13.10
to FROM centos
) and it worked fine. It seems to be a problem with Ubuntu.