Docker Community Forums

Share and learn in the Docker community.

Docker CE 19.03.12 on Ubuntu Server 20.04.1 - curl on macvlan network not working

Hi all

I am struggling with a new install of Docker CE 19.03.12 on Ubuntu Server 20.04.1 - everything has initially been working fine, until I tried to start a container that uses curl to download a file as part of it’s initialization.

The file download always fails - yet I can download it successfully from the Docker host, and from any other machine on the network - thus I think it’s something to do with the Docker install itself and not the firewall or network.

It almost feels like an MTU issue, but I’ve tried adding:

  "mtu": 1454

to /etc/docker/daemon.json and restarting, but to not avail.

Sometimes from within the container, curl can download a few percent of the file, before it hangs and subsequently times out. Sometimes it fails to download it at all (i.e. the download doesn’t even begin).

The container is being brought up using a docker-compose file, and is using a MACVLAN network. It previously worked on an earlier incarnation of Docker CE on Ubuntu Server 16.04, so this problem seems to relate to the later version of Docker CE and/or Ubuntu.

Any ideas on how to fix this or debug it further?

Many thanks


you can change the following command :

sudo add-apt-repository \ "deb [arch=amd64] \ (lsb_release -cs)

$ sudo add-apt-repository
“deb [arch=amd64]
By that what we are doing is we are using bionic (Ubuntu 18.04 LTS) release file.

Rest of the commands are okay and will work on 20.04 as well.

Also make sure that you removed the following entry from your /etc/apt/sources.list if present before installing docker

deb [arch=amd64] focal stable