Container-network does not disable docker default bridge network

Hi All,

I am struggling setting up a single host shinyproxy / docker combo.

When I start the demo application I noticed it is listening on port 20000 on all interfaces on the docker host, which is expected when using the default docker0 bridge. The solution would be to create new bridge network in docker, assign an external IP to it using and use that for my apps.
In the documentation I found container-network: facilities to set the networking of the container. This is the equivalent of launching the container with a --network option (and defaults to bridge which is also the Docker default).
I assumed that by creating a custom network and assigning it to my app using this option it would switch from the default network to the new one. What I find however is that the new network is added to the container but the default docker bridge remains next to it and is still being used for all communications. What am I doing wrong?

  - id: shinyproxy-demo
    display-name: ShinyProxy Demo
    container-image: openanalytics/shinyproxy-demo
    container-network-connections: [ "shiny-net" ]
    access-groups: admins

docker network create --driver=bridge \
  --subnet= \
  --gateway= \
  --internal=false \
  --ingress=false \
  --ipv6=false \
  --attachable=false \
  --opt \
  --opt \
  --opt \
  --opt \
  --opt \

result in container:
root@60bd7dc7d1da:/# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet scope host lo
valid_lft forever preferred_lft forever
36: eth0@if37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet brd scope global eth0
valid_lft forever preferred_lft forever
38: eth1@if39: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:01:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet brd scope global eth1
valid_lft forever preferred_lft forever
root@60bd7dc7d1da:/# ip ro
default via dev eth0 dev eth1 proto kernel scope link src dev eth0 proto kernel scope link src


The documentation is a bit unclear here. The behavior is indeed that the configured networks are added, in addition to the default bridge. I’ll update the documentation. Currently, there is no way to remove the default bridge from the started containers.

ok, thanks for the info!