Easiest/Simplest way to get a custom docker image into TrueNAS Scale?

Joined
Feb 14, 2022
Messages
1
I have created a docker image of a personal application and can not for the life of me figure out how to get TrueNAS Scale to see it?
It is not in a registry for it to be pulled from, because it is a private application.
Do I really have to jump through those hoops, get a private repo set up and all that just to load a SINGLE tiny docker image into TrueNAS Scale?

Please advise if I am missing something or if as the Mandalorians say; "this is the way".
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
On the "Deploy Docker Image" wizard, you can enter the full URL to your private image / repository. If you do org/name syntax, it defaults to Docker Hub, but if you give it full URI it'll do the right thing.
 

MichelB

Cadet
Joined
Jul 25, 2021
Messages
7
docker private repo or push to docker hub is nice, but there is an easier option if you want to keep things private:

your system:
docker save <image:tag> > my_image.tar

copy using samba to your truenass

open shell in gui on truenass and execute:
docker load my_image.tar

you can zip it if it's really big, but that normally isn't the case for containers, nor local networks ...
you can use your image on truenass now
 

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
Thanks both. I got this working.

If you do org/name syntax, it defaults to Docker Hub, but if you give it full URI it'll do the right thing.
I loaded the image as decribed before by @MichelB . In the wizard I entered just <image name> in the "repository field". Is that the correct way respectively what do you mean by full URI?

Moreover, I build the image on the truenas machine itself. Why using a different system here?
 
Last edited:

MichelB

Cadet
Joined
Jul 25, 2021
Messages
7
Thanks both. I got this working.


I loaded the image as decribed before by @MichelB . In the wizard I entered just <image:tag> in the "repository field". Is that the correct way respectively what do you mean by full URI?

Moreover, I build the image on the truenas machine itself. Why using a different system here?
Short:
You do not need the uri if you load it from your local image cache. It will see if the image with the tag is present locally and load it from the image cache.

Long:
The uri is only needed to specify that it comes from a remote docker-compatible (they are all docker compatible today, the alternative would be "minimal" oci) image repository.
So, the uri is only needed if you want to specirfy the remote repository explicitly, should your system have multiple sources for images. Most popular are dockerhub (mostly the default too), but there is also quay.io (redhat/openshift, but work generally too) and then there are vendor specific ones like fedora/redhat repo's, but those are mostly optimized for their kubernetes-specific distro's.

I hope this helps.
 

Flachzange

Dabbler
Joined
Jul 10, 2022
Messages
16
Thanks and I got this working this way! But it is the correct way to specify just the image name in the mandatory repository field?
 

MichelB

Cadet
Joined
Jul 25, 2021
Messages
7
yes, it's fine. Normally, if you specify an image name only, it will look for that image (with the tag "latest") in the docker registries registered in the kubernetes configuration. However, as it's available in the local cache, it will load it from there of course.
 
Top