Device "docker0" does not exist

Looking to make a contrib docker based with an application that supply a launcher to create the container, I have some issue to talk. The name of the contrib I aim is discourse

I can create the container with a stock docker, use a linux socket to communicate with apache, and therefore get rid of any network issue. My issue comes when I try to use nethserver-docker on the @mrmarkuz and to be compatible

It seems there is not the default network of docker called docker0, the launcher stop at this point

[root@ns7loc15 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ns7loc15 ~]# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
0526a5665e09        aqua                bridge              local
0acaaae75611        host                host                local
05a0bf1a8ccf        none                null                local
[root@ns7loc15 ~]# ip a
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 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:72:ad:38 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.16/24 brd 192.168.56.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe72:ad38/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:14:31:5f brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 85762sec preferred_lft 85762sec
    inet6 fe80::a00:27ff:fe14:315f/64 scope link 
       valid_lft forever preferred_lft forever
4: aqua0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:0c:b8:2c:f4 brd ff:ff:ff:ff:ff:ff
    inet 172.28.0.1/16 brd 172.28.255.255 scope global aqua0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:cff:feb8:2cf4/64 scope link 
       valid_lft forever preferred_lft forever

this is not good because the launcher of discourse try to create on this default interface with the default bridge of docker.

I could remove the bridge none in /etc/docker/docker.conf, this time the bridge is created but I have some networking issue on the default bridge

[root@ns7loc15 discourse]#  docker run busybox ping -c 1 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes

--- 8.8.4.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss

The launcher stops because it cannot retrieve some files remotely. Obviously everything seems to work on acqua network

[root@ns7loc15 discourse]#  docker run --net=aqua busybox nslookup google.com
Server:		127.0.0.11
Address:	127.0.0.11:53

Non-authoritative answer:
Name:	google.com
Address: 2a00:1450:4007:805::200e

*** Can't find google.com: No answer

[root@ns7loc15 discourse]#  docker run --net=aqua busybox ping -c 1 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
64 bytes from 8.8.4.4: seq=0 ttl=61 time=19.222 ms

--- 8.8.4.4 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 19.222/19.222/19.222 ms

I wonder if it is a good idea to have a specific acqua network and remove the docker default one ?

removing everything in /etc/docker/docker.conf, then restarting docker make the installation by the launcher workable

2 Likes

It seems now the default configuration to docker are loaded from /etc/docker/daemon.json, no need to create the file /etc/docker/docker.json and make modifcation of systemd in /etc/systemd/system/docker.service.d/nethserver.conf

ping @mrmarkuz

2 Likes

I can use the aqua network by passing all docker argument I need in the app.yml

docker_args:
  - '--network aqua'

hum…I could use nethserver-docker as dependency, this is good

Note: You cannot set options in daemon.json that have already been set on daemon startup as a flag. On systems that use systemd to start the Docker daemon, -H is already set, so you cannot use the hosts key in daemon.json to add listening addresses. See Configure the daemon with systemd | Docker Docs for how to accomplish this task with a systemd drop-in file.

this was the best choice, we need to have this file to set directives

Why you should never use the default bridge of docker

2 Likes