The null network

Sometimes, we need to run a few application services or jobs that do not need any network connection at all to execute the task. It is strongly advised that you run those applications in a container that is attached to the none network. This container will be completely isolated, and thus safe from any outside access. Let's run such a container:

$ docker container run --rm -it --network none alpine:latest /bin/sh

Once inside the container, we can verify that there is no eth0 network endpoint available:

/ # ip addr show eth0
ip: can't find device 'eth0'

There is also no routing information available, as we can demonstrate by using the following command:

/ # ip route

This returns nothing.