Multiple Docker Instances – I screwed up!
So after getting the first Oznu Docker up and running I wanted to created a second docker on the same pi to have a separate instance of Homebridge running to keep certain plug ins away from each other. I saw another post in here and tried to piece it all together.

For the 1st (initial) install of oznu/docker I followed these step:
https://github.com/oznu/docker-homebridge/wiki/Homebridge-on-Raspberry-Pi

Again I got everything working! Then to get another docker image going I started from step #3 with a couple of changes:

```
mkdir /home/pi/homebridge-two
cd /home/pi/homebridge-two
```

`nano docker-compose.yml`

put in the following contents: 

```
version: '2'
services:
  homebridge:
    image: oznu/homebridge:raspberry-pi
    restart: always
    network_mode: host
    volumes:
      - ./config:/homebridge-two
    environment:
      - PGID=1000
      - PUID=1000

```

`CTRL+X`

`docker-compose up -d`

`docker-compose logs -f`

The logs come up with the QR code and everything. However, I noticed that no config.json was ever created inside my Homebridge-two folder. 

I then realized that the docker-compose.yml had a mistake in it " - ./config:/homebridge-two" and changed that line to " - ./config-two:/homebridge" for this:

```
version: '2'
services:
  homebridge:
    image: oznu/homebridge:raspberry-pi
    restart: always
    network_mode: host
    volumes:
      - ./config-two:/homebridge
    environment:
      - PGID=1000
      - PUID=1000

```

I ran this command again:

`docker-compose up -d`

But it didn't make a difference. There is still no config.json and even creating my own config.json in homebridge-two/config doesn't make a difference. The second docker install seems to be reading its configuration from somewhere else.

Here is the log that I get when running `docker-compose logs -f` inside pi@raspberrypi:~/homebridge-two:

```
Attaching to homebridgetwo_homebridge_1
homebridge_1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
homebridge_1  | [s6-init] ensuring user provided files have correct perms...exited 0.
homebridge_1  | [fix-attrs.d] applying ownership & permissions fixes...
homebridge_1  | [fix-attrs.d] done.
homebridge_1  | [cont-init.d] executing container initialization scripts...
homebridge_1  | [cont-init.d] 10-adduser: executing... 
homebridge_1  | 
homebridge_1  | -------------------------------------
homebridge_1  | GID/UID
homebridge_1  | -------------------------------------
homebridge_1  | User uid:    1000
homebridge_1  | User gid:    1000
homebridge_1  | -------------------------------------
homebridge_1  | 
homebridge_1  | [cont-init.d] 10-adduser: exited 0.
homebridge_1  | [cont-init.d] 20-set-timezone: executing... 
homebridge_1  | [cont-init.d] 20-set-timezone: exited 0.
homebridge_1  | [cont-init.d] 30-packages: executing... 
homebridge_1  | [cont-init.d] 30-packages: exited 0.
homebridge_1  | [cont-init.d] 40-dbus-avahi: executing... 
homebridge_1  | [cont-init.d] 40-dbus-avahi: exited 0.
homebridge_1  | [cont-init.d] 45-user-data: executing... 
homebridge_1  | [cont-init.d] 45-user-data: exited 0.
homebridge_1  | [cont-init.d] 50-plugins: executing... 
homebridge_1  | Homebridge: Installing plugins...
homebridge_1  | npm WARN homebridge No description
homebridge_1  | npm WARN homebridge No repository field.
homebridge_1  | npm WARN homebridge No license field.
homebridge_1  | 
homebridge_1  | up to date in 0.382s
homebridge_1  | npm WARN homebridge No description
homebridge_1  | npm WARN homebridge No repository field.
homebridge_1  | npm WARN homebridge No license field.
homebridge_1  | 
homebridge_1  | up to date in 0.435s
homebridge_1  | [cont-init.d] 50-plugins: exited 0.
homebridge_1  | [cont-init.d] 55-config-ui: executing... 
homebridge_1  | [cont-init.d] 55-config-ui: exited 0.
homebridge_1  | [cont-init.d] done.
homebridge_1  | [services.d] starting services
homebridge_1  | Starting dbus-daemon
homebridge_1  | [services.d] done.
homebridge_1  | Starting Avahi daemon
homebridge_1  | Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
homebridge_1  | Successfully dropped root privileges.
homebridge_1  | avahi-daemon 0.6.32 starting up.
homebridge_1  | WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
homebridge_1  | Loading service file /etc/avahi/services/sftp-ssh.service.
homebridge_1  | Loading service file /etc/avahi/services/ssh.service.
homebridge_1  | *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
homebridge_1  | Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
homebridge_1  | New relevant interface docker0.IPv4 for mDNS.
homebridge_1  | Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.1.11.
homebridge_1  | New relevant interface eth0.IPv4 for mDNS.
homebridge_1  | Network interface enumeration completed.
homebridge_1  | Registering new address record for 172.17.0.1 on docker0.IPv4.
homebridge_1  | Registering new address record for fe80::adf3:bbd0:ae26:99a4 on eth0.*.
homebridge_1  | Registering new address record for 10.0.1.11 on eth0.IPv4.
homebridge_1  | Server startup complete. Host name is raspberrypi.local. Local service cookie is 19093884.
homebridge_1  | Service "raspberrypi" (/etc/avahi/services/ssh.service) successfully established.
homebridge_1  | Service "raspberrypi" (/etc/avahi/services/sftp-ssh.service) successfully established.
homebridge_1  | *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
homebridge_1  | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1  | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
homebridge_1  | *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
homebridge_1  | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1  | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
homebridge_1  | [2018-1-27 01:26:55] Loaded plugin: homebridge-dummy
homebridge_1  | [2018-1-27 01:26:55] Registering accessory 'homebridge-dummy.DummySwitch'
homebridge_1  | [2018-1-27 01:26:55] ---
homebridge_1  | [2018-1-27 01:26:56] Loaded plugin: homebridge-config-ui-x
homebridge_1  | [2018-1-27 01:26:56] Registering platform 'homebridge-config-ui-x.config'
homebridge_1  | [2018-1-27 01:26:56] ---
homebridge_1  | [2018-1-27 01:26:56] Loaded config.json with 0 accessories and 0 platforms.
homebridge_1  | [2018-1-27 01:26:56] ---
homebridge_1  | [2018-1-27 01:26:56] Loading 0 platforms...
homebridge_1  | [2018-1-27 01:26:56] Loading 0 accessories...
homebridge_1  | Setup Payload:
homebridge_1  | X-HM://0023ISYWYH44A
homebridge_1  | Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  | Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
homebridge_1  |                        
homebridge_1  |     ┌────────────┐     
homebridge_1  |     │ 031-45-154 │     
homebridge_1  |     └────────────┘     
homebridge_1  |                        
homebridge_1  | [2018-1-27 01:26:56] Homebridge is running on port 51826.
homebridge_1  | Disconnected from D-Bus, exiting.
homebridge_1  | Got SIGTERM, quitting.
homebridge_1  | Leaving mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
homebridge_1  | Leaving mDNS multicast group on interface eth0.IPv4 with address 10.0.1.11.
homebridge_1  | avahi-daemon 0.6.32 exiting.
homebridge_1  | 
homebridge_1  | /usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:42
homebridge_1  |     var error = dns_sd.buildException(errorCode);
homebridge_1  |                        ^
homebridge_1  | Error: dns service error: unknown
homebridge_1  |     at Advertisement.on_service_registered (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:42:24)
homebridge_1  |     at SocketWatcher.MDNSService.self.watcher.callback (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/mdns_service.js:18:40)
homebridge_1  | [cont-finish.d] executing container finish scripts...
homebridge_1  | [cont-finish.d] done.
homebridge_1  | [s6-finish] syncing disks.
homebridge_1  | [s6-finish] sending all processes the TERM signal.
homebridge_1  | [s6-finish] sending all processes the KILL signal and exiting.
homebridge_1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
homebridge_1  | [s6-init] ensuring user provided files have correct perms...exited 0.
homebridge_1  | [fix-attrs.d] applying ownership & permissions fixes...
homebridge_1  | [fix-attrs.d] done.
homebridge_1  | [cont-init.d] executing container initialization scripts...
homebridge_1  | [cont-init.d] 10-adduser: executing... 
homebridge_1  | usermod: no changes
homebridge_1  | 
homebridge_1  | -------------------------------------
homebridge_1  | GID/UID
homebridge_1  | -------------------------------------
homebridge_1  | User uid:    1000
homebridge_1  | User gid:    1000
homebridge_1  | -------------------------------------
homebridge_1  | 
homebridge_1  | [cont-init.d] 10-adduser: exited 0.
homebridge_1  | [cont-init.d] 20-set-timezone: executing... 
homebridge_1  | [cont-init.d] 20-set-timezone: exited 0.
homebridge_1  | [cont-init.d] 30-packages: executing... 
homebridge_1  | [cont-init.d] 30-packages: exited 0.
homebridge_1  | [cont-init.d] 40-dbus-avahi: executing... 
homebridge_1  | [cont-init.d] 40-dbus-avahi: exited 0.
homebridge_1  | [cont-init.d] 45-user-data: executing... 
homebridge_1  | [cont-init.d] 45-user-data: exited 0.
homebridge_1  | [cont-init.d] 50-plugins: executing... 
homebridge_1  | Homebridge: Installing plugins...
homebridge_1  | npm WARN homebridge No description
homebridge_1  | npm WARN homebridge No repository field.
homebridge_1  | npm WARN homebridge No license field.
homebridge_1  | 
homebridge_1  | up to date in 0.38s
homebridge_1  | npm WARN homebridge No description
homebridge_1  | npm WARN homebridge No repository field.
homebridge_1  | npm WARN homebridge No license field.
homebridge_1  | 
homebridge_1  | up to date in 0.425s
homebridge_1  | [cont-init.d] 50-plugins: exited 0.
homebridge_1  | [cont-init.d] 55-config-ui: executing... 
homebridge_1  | [cont-init.d] 55-config-ui: exited 0.
homebridge_1  | [cont-init.d] done.
homebridge_1  | [services.d] starting services
homebridge_1  | Starting dbus-daemon
homebridge_1  | [services.d] done.
homebridge_1  | Starting Avahi daemon
homebridge_1  | Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
homebridge_1  | Successfully dropped root privileges.
homebridge_1  | avahi-daemon 0.6.32 starting up.
homebridge_1  | WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
homebridge_1  | Loading service file /etc/avahi/services/sftp-ssh.service.
homebridge_1  | Loading service file /etc/avahi/services/ssh.service.
homebridge_1  | *** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
homebridge_1  | Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
homebridge_1  | New relevant interface docker0.IPv4 for mDNS.
homebridge_1  | Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.1.11.
homebridge_1  | New relevant interface eth0.IPv4 for mDNS.
homebridge_1  | Network interface enumeration completed.
homebridge_1  | Registering new address record for 172.17.0.1 on docker0.IPv4.
homebridge_1  | Registering new address record for fe80::adf3:bbd0:ae26:99a4 on eth0.*.
homebridge_1  | Registering new address record for 10.0.1.11 on eth0.IPv4.
homebridge_1  | Server startup complete. Host name is raspberrypi.local. Local service cookie is 2227238789.
homebridge_1  | Service "raspberrypi" (/etc/avahi/services/ssh.service) successfully established.
homebridge_1  | Service "raspberrypi" (/etc/avahi/services/sftp-ssh.service) successfully established.
homebridge_1  | *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
homebridge_1  | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1  | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
homebridge_1  | *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
homebridge_1  | *** WARNING *** Please fix your application to use the native API of Avahi!
homebridge_1  | *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
homebridge_1  | [2018-1-27 01:40:36] Loaded plugin: homebridge-dummy
homebridge_1  | [2018-1-27 01:40:36] Registering accessory 'homebridge-dummy.DummySwitch'
homebridge_1  | [2018-1-27 01:40:36] ---
homebridge_1  | [2018-1-27 01:40:37] Loaded plugin: homebridge-config-ui-x
homebridge_1  | [2018-1-27 01:40:37] Registering platform 'homebridge-config-ui-x.config'
homebridge_1  | [2018-1-27 01:40:37] ---
homebridge_1  | [2018-1-27 01:40:37] Loaded config.json with 0 accessories and 0 platforms.
homebridge_1  | [2018-1-27 01:40:37] ---
homebridge_1  | [2018-1-27 01:40:37] Loading 0 platforms...
homebridge_1  | [2018-1-27 01:40:37] Loading 0 accessories...
homebridge_1  | Setup Payload:
homebridge_1  | X-HM://0023ISYWYH44A
homebridge_1  | Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  |                                                       
homebridge_1  | Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
homebridge_1  |                        
homebridge_1  |     ┌────────────┐     
homebridge_1  |     │ 031-45-154 │     
homebridge_1  |     └────────────┘     
homebridge_1  |                        
homebridge_1  | [2018-1-27 01:40:37] Homebridge is running on port 51826.

```

My initial docker image is still running fine and I apparently have a second docker image running somewhere as well but I don't know where! So I somehow SCREWED UP!

Is there any way I can get rid of this second docker image and then re-create it the correct way? Any instructions would be so very much appreciated!

