Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

463
Views
Why is network/internet in my Docker container so slow?

I'm asking this question because it took me ages to figure out why the networking in my base ubuntu container was so slow, up to 50 times slower than the host OS, which made any kind of apt-get installations take extremely long (45+ minutes in some cases).

How can I make the networking in my container faster?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Simply changing my DNS server instantly fixed the problem. Previously, DNS lookups were taking 5+ seconds, and now they're <.1 second.

Just change the nameserver lines in /etc/resolv.conf to:

nameserver 8.8.8.8
nameserver 8.8.4.4

which is Google's DNS Server.

Wanted to post this answer here because I couldn't find this advice anywhere online, and it made a night and day difference for me.

You can also specify the dns server as an argument to docker run. For example:

docker run --dns 8.8.8.8 <container name>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!