Docker Community Forums

Share and learn in the Docker community.

Apt-get time out on docker-container


(Vagrant1337) #1

General information:
I have a docker container running on Ubuntu 18.04.1 LTS.
The Container itself runs on ubuntu aswell.
I’m behind a corporate proxy.

Problem:
When I try to run “apt-get update” I get a “connection timed out” error every time.
When I try to ping a ip, it just gets stuck and doesnt respond.

What I tried:

  • edited the /etc/default/docker for DNS and proxy
  • edited /etc/systemd/system/docker.service.d/http-proxy.conf

I have full internet-access on my host maschine. When I run apt-get update or any other command on the docker container, it recognizes the ip of the service but then just times out.

==> Running the quorum-maker (https://github.com/synechron-finlabs/quorum-maker#setting-up-quorum-network-on-multiple-machines)

Hope someone can help.


(Justin Bodnar) #2

Did you launch the container with Docker networking enabled?

I’m not sure what you mean by, ‘it recognizes the ip of the service.’ Are you saying it properly resolves DNS?


(Dskozin) #3

I have same problem now.

vagrant1337, do you fix it?


(Dskozin) #4

Huff!

I solve my problem by:
RUN echo ‘Acquire::http::Proxy “http://proxy…:80”; Acquire::https::Proxy
http://proxy…:80”;’ >> /etc/apt/apt.conf.d/httpproxy

inside Dockerfile.