The docker container needs to be created with the network option set to one of the networks otherwise it will not work.