Reconcile Docker With Deutsche Bahn


Composition of screenshots

If you happen to be a (Linux) power user travelling on a Deutsche Bahn ICE long-distance train and you wonder why you don’t get a working network connection with the complemenatary “WIFIonICE” wireless network, there may be a network interference on your laptop.

There are multiple solutions for this on the web. My favorite solution is to change Docker’s network configuration by editing (or creating) the file /etc/docker/daemons.json. However, you may need to prune existing Docker networks first. Otherwise the Docker service will fail to start with the following message:

failed to start daemon: Error initializing network controller: error creating default "bridge" network: all predefined address pools have been fully subnetted

Therefore, I recommend the following steps (this is on a Fedora Linux system with systemd):

  1. Stop any docker containers that you may have running, including services managed by docker compose.

  2. Prune the networks:

    docker network prune
    
  3. Create or edit /etc/docker/daemon.json so that it contains the following:

    {
        "default-address-pools":
        [
            {"base":"172.19.0.0/16","size":24}
        ]
    }
    
  4. Restart docker:

    systemctl restart docker
    
  5. Connect to WIFIonICE and enjoy your network connection :-)

References