Fuego wiki

Login or create account

Issue 0029

problem building docker container - can't resolve debian servers

Description [edit section]

dhinakar reported the problem in this msg
    > Step 11 : RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-
    > get -yV install apt-utils daemon gcc make python-paramiko python-lxml
    > python-simplejson python-matplotlib libtool xmlstarlet autoconf automake
    > rsync openjdk-7-jre openjdk-7-jdk iperf netperf netpipe-tcp texlive-latex-
    > base sshpass wget git diffstat sudo net-tools vim openssh-server curl inotify-
    > tools
    >  ---> Running in e672ed2945a2
    > Err jessie InRelease
    > Err jessie/updates InRelease
    > Err jessie Release.gpg
    >   Could not resolve ' <> '
    > Err jessie/updates Release.gpg
    >   Could not resolve ' <> '
    > Err jessie InRelease
    > Err jessie-updates InRelease
    > Err jessie Release.gpg
    >   Could not resolve ' <> '
    > Err jessie-updates Release.gpg
    >   Could not resolve ' <> '
    > Reading package lists...

Notes [edit section]

It turns out that Dhinakar was in a corporate setting, where his host machine had /etc/resolv.conf pointing to a nameserver (which is usually a local dnsmasq server). Docker has problems in this case, and needs a real DNS server. We tried various things, including DOCKER_OPTS to specify a "--dns". Dhinakar reported that his corporate environment does not allow access to the public nameserver.

A solution that finally worked was the following patch to his Dockerfile, but with the server IP address replaced with a static IPV4 address that was provided to Dhinakar by his IT department.

    diff --git a/Dockerfile b/Dockerfile
    index f9f2fb7..e54d391 100644
    --- a/Dockerfile
    +++ b/Dockerfile
    @@ -20,6 +20,8 @@ ENV URL_PREFIX /fuego
     # ==============================================================================
     WORKDIR /fuego-install
    +COPY /etc/resolv.conf /etc/
    +RUN echo nameserver > /etc/resolv.conf
     RUN dpkg --add-architecture i386
     RUN echo deb jessie main non-free >> /etc/apt/sources.list
     RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' > /etc/apt/apt.conf.d/80proxy; fi
    @@ -124,4 +126,5 @@ WORKDIR /home/jenkins
     COPY fuego-scripts /
     COPY fuego-scripts/ /etc/
     CMD /etc/
    +COPY /etc/ /etc/resolv.conf


Fuego Issues List

TBWiki engine 1.8.2 by Tim Bird