Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add support for docker insecure registries #960

Open
BasTossings opened this issue Sep 27, 2021 · 5 comments
Open

Feature request: add support for docker insecure registries #960

BasTossings opened this issue Sep 27, 2021 · 5 comments

Comments

@BasTossings
Copy link

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.

@YaBoiDan
Copy link

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

@Leseratte10
Copy link
Contributor

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.

@Mike710Shine
Copy link

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.

@Leseratte10
Copy link
Contributor

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.

@Mike710Shine
Copy link

Mike710Shine commented Aug 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants