elmerfds / rebuild-dndc

Re-create containers that use another container's network stack (i.e. routing container traffic through a VPN container)
GNU General Public License v3.0
22 stars 9 forks source link

check for none on add_net #66

Closed olayonjavier closed 11 months ago

olayonjavier commented 1 year ago

Potential fix for https://github.com/elmerfdz/rebuild-dndc/issues/65

Previous logs

--Build qbittorrent

Name: qbittorrent
Found Net:  --net="none"
Found Environment:  -e PUID="99"
Found Environment:  -e PGID="100"
Found Environment:  -e UMASK="002"
Found TimeZone:  -e TZ="America/New_York"
Found volume:  -v "/mnt/user/appdata/qbittorrent":"/config":rw
Found volume:  -v "/mnt/user/data/torrents/":"/data/torrents/":rw
Found Extra params:  --net=container:gluetun
Found Repo:  cr.hotio.dev/hotio/qbittorrent:release
/usr/bin/docker run -d --name="qbittorrent" --net="none" -e PUID="99" -e PGID="100" -e UMASK="002" -e TZ="America/New_York" -v "/mnt/user/appdata/qbittorrent":"/config":rw -v "/mnt/user/data/torrents/":"/data/torrents/":rw --net=container:gluetun cr.hotio.dev/hotio/qbittorrent:release
/usr/bin/docker: Error response from daemon: Container cannot be connected to network endpoints: container:gluetun, none.
See '/usr/bin/docker run --help'.
Command was: /usr/bin/docker run -d --name="qbittorrent" --net="none" -e PUID="99" -e PGID="100" -e UMASK="002" -e TZ="America/New_York" -v "/mnt/user/appdata/qbittorrent":"/config":rw -v "/mnt/user/data/torrents/":"/data/torrents/":rw --net=container:gluetun cr.hotio.dev/hotio/qbittorrent:release
Note this script does not parse xml encoded strings correctly (like ø), which may cause docker to fail.

After:

Name: qbittorrent
Found Environment:  -e PUID="99"
Found Environment:  -e PGID="100"
Found Environment:  -e UMASK="002"
Found TimeZone:  -e TZ="America/New_York"
Found volume:  -v "/mnt/user/appdata/qbittorrent":"/config":rw
Found volume:  -v "/mnt/user/data/torrents/":"/data/torrents/":rw
Found Extra params:  --net=container:gluetun
Found Repo:  cr.hotio.dev/hotio/qbittorrent:release
/usr/bin/docker run -d --name="qbittorrent" -e PUID="99" -e PGID="100" -e UMASK="002" -e TZ="America/New_York" -v "/mnt/user/appdata/qbittorrent":"/config":rw -v "/mnt/user/data/torrents/":"/data/torrents/":rw --net=container:gluetun cr.hotio.dev/hotio/qbittorrent:release
b013f1c28838bd9601335981b307711a186513187f6d00c1699a89b86fdd3400
elmerfds commented 11 months ago

@olayonjavier Thanks for fix