webgui icon indicating copy to clipboard operation
webgui copied to clipboard

Feature request: add support for docker insecure registries

Open Sebtous opened this issue 4 years ago • 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.

Sebtous avatar Sep 27 '21 17:09 Sebtous

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

YaBoiDan avatar Jul 23 '22 23:07 YaBoiDan

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.

Leseratte10 avatar Jun 05 '23 04:06 Leseratte10

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.

Mike710Shine avatar Aug 18 '23 17:08 Mike710Shine

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.

Leseratte10 avatar Aug 18 '23 17:08 Leseratte10

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

Mike710Shine avatar Aug 18 '23 18:08 Mike710Shine