Allow insecure docker registries

andimattes

Cadet
Joined
Nov 2, 2023
Messages
6
I just wanted to install a custom docker app on my TrueNAS Scale 23.10.0.1
As I'm hosting my own registry (using the dockerregistry chart from truecharts) I added <nas-ip>/<image-name> as the url for the dockerfile. When deploying the container I get an error regarding the lack of HTTPS of my registry (which is true as it just runs on HTTP).

The exact error is the following:
Code:
http: server gave HTTP response to HTTPS client


This error is common since I had the same error when trying to push a docker image from my local computer to the registry. In general this error can be easily solved by adding
Code:
"insecure-registries" : [ "host-ip:5000" ]
to /etc/docker/daemon.json (as described here on stackoverflow)

Unfortunately I was not able to do the same on TrueNAS Scale. Does anyone else experienced the same and have a potential solution?

Thanks for every help in advance!
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Your best bet is to ask on Truecharts discord channel.
 

jalavoy

Cadet
Joined
Nov 29, 2023
Messages
3
You can specify insecure registries with containerd (which is what Cobia is using) by creating the file `/etc/rancher/k3s/registries.yaml` and giving it the following content, replacing the IP and Port for your insecure registry. Then restarting containerd or rebooting.

mirrors:
"10.1.1.254:5000":
endpoint:
- "http://10.1.1.254:5000"
 

jalavoy

Cadet
Joined
Nov 29, 2023
Messages
3
Ugh, formatting...

Code:
mirrors:
  "10.1.1.254:5000":
    endpoint:
      - "http://10.1.1.254:5000"
 

jalavoy

Cadet
Joined
Nov 29, 2023
Messages
3
Ugh, formatting...

Code:
mirrors:
  "10.1.1.254:5000":
    endpoint:
      - "http://10.1.1.254:5000"

Man i can't get this to format correctly, or edit my posts, sorry. This is the proper formatting without the forum screwing it up.

1701278417673.png
 
Top