FrontPage 

Fuego 1.1 wiki

Login or create account

Issue 0029 in 'raw' format

; Summary: problem building docker container - can't resolve debian servers
; Owner: Tim
; Reporter: Dhinakar
; Status: closed
; Priority: medium

= Description =
dhinakar
reported the problem in this [[https://lists.linuxfoundation.org/pipermail/fuego/2017-March/000210.html|msg]]
{{{#!YellowBox
> 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 http://ftp.us.debian.org jessie InRelease
> 
> Err http://security.debian.org jessie/updates InRelease
> 
> Err http://ftp.us.debian.org jessie Release.gpg
>   Could not resolve 'ftp.us.debian.org <http://ftp.us.debian.org> '
> Err http://security.debian.org jessie/updates Release.gpg
>   Could not resolve 'security.debian.org <http://security.debian.org> '
> Err http://deb.debian.org jessie InRelease
> 
> Err http://deb.debian.org jessie-updates InRelease
> 
> Err http://deb.debian.org jessie Release.gpg
>   Could not resolve 'deb.debian.org <http://deb.debian.org> '
> Err http://deb.debian.org jessie-updates Release.gpg
>   Could not resolve 'deb.debian.org <http://deb.debian.org> '
> Reading package lists...
}}}

= Notes =

It turns out that Dhinakar was in a corporate setting, where his host
machine had /etc/resolv.conf pointing to a nameserver 127.0.1.1 (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 8.8.8.8".  Dhinakar reported that his corporate
environment does not allow access to the 8.8.8.8 public nameserver.

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

{{{#!YellowBox
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/resolv.conf.save
+RUN echo nameserver 8.8.8.8 > /etc/resolv.conf
 RUN dpkg --add-architecture i386
 RUN echo deb http://ftp.us.debian.org/debian 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/fuego-start-cmd.sh /etc/
 CMD /etc/fuego-start-cmd.sh
+COPY /etc/resolv.conf.save /etc/resolv.conf
}}}


; backlink: [[Fuego Issues List]]




TBWiki engine 1.8.3 by Tim Bird