Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5962

Docker apt-get update fails [closed]

$
0
0

Can somebody help me get apt-get working in my docker container? Whenever I try running any apt-get command in my docker container, the command fails. I'm running Docker version 1.1.1, build bd609d2 on ubuntu 12.04.

When I do

$ sudo docker run -i -t ubuntu:14.04 /bin/bash# apt-get update

I get errors saying

Could not resolve 'archive.ubuntu.com'

I tried uncommenting the line below in /etc/default/docker

DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

but I still can't ping google.com

ping: unknown host

I confirmed that the container is using the dns servers 8.8.8.8 and 8.8.4.4

root@0baa87fc6322:/# cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

and I'm able to ping both servers so I'm pretty sure that a firewall isn't just dropping my packets.

Any help with this would be appreciated!

Thanks!


Viewing all articles
Browse latest Browse all 5962

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>