unraid/webgui

Feature request: add support for docker insecure registries

Opened this issue · 5 comments

In order to pull a container from my private, insecure registry, right now I have to manually copy a daemon.json to /etc/docker/ with the following content:

{
  "insecure-registries": [
    "XXX.XXX.XXX.XXX:5000"
  ]
}

The problem is, this file disappears when I reboot the server (because it's on a RAM disk). It would be really nice to have official support for this feature (Web GUI and all) so that I don't have to do the above steps every time I reboot the server.

@BasTossings, did you manage to find a way around this? Sort of adding it as a startup script?

UnRAID does have a custom start script at /boot/config/go. No need for UnRAID to provide a dedicated setting for that.

This script is executed upon boot. By default it just contains one line (/usr/local/sbin/emhttp &) to start the webUI, but you can extend it like this:

#!/bin/bash

cat << EOF > /etc/docker/daemon.json
{
  "insecure-registries": [
    "XXX.XXX.XXX.XXX:5000"
  ]
}
EOF

# Start the Management Utility
/usr/local/sbin/emhttp &

Or, if you want to make editing easier, you could just put cp /boot/config/custom_docker_config.json /etc/docker/daemon.json and then keep the JSON file on the UnRAID flash drive.

When I do it this way, the file cannot be created because the folder is not there yet. If you now create the folder and the file in it, Docker does not start anymore.

If docker no longer starts with the file in there, there's probably a typo or some other error in the file. Check the logs as to why Docker refuses to start.

That was the first thing I thought. Allderings I downloaded the file from the server with SFTP then deleted the folder and then Docker started again by hand then it works and then you can also stop the same file insert and start again then it works
But unfortunately nothing automatically
The other thing is funnily enough when I try to restart Docker via a user-script it doesn't work either but very well via the terminal