Two image pulls in one container

SAINT

Dabbler
Joined
Jun 20, 2015
Messages
16
Hey all, is is possible to pull two images in one container with the SCALE GUI? I can't seem to find any documentation on this.

I need to run nginx with mysql in the same container, but for whatever reason I can't seem to get it to work with a docker compose file. Individually, both run when I set it up through the TrueNAS GUI using the "Launch Docker Image" option. Has anyone found a way to pull two images into the one container with the GUI though?

Cheers!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think you need to do a little more research on your docker/container theory.

An image is what's used to create a container. (and vice-versa)

Therefore, you can't put more than one image into a container.

You can build "apps" or "services" with tools like docker compose or helm charts in kubernetes which put containers together to make them into a complete unit. (TrueNAS SCALE implements Kubernetes, so using helm charts is the way on that platform)

You can also build containers separately and use the internal kubernetes DNS to have them talk to each other... but for a need as simple as yours, maybe you can already find something that meets the need in TrueCharts (https://truecharts.org).
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe helpful would be to look at how the TrueCharts folks suggest you can connect containers by name using the internal DNS:
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
To directly answer the question as well, assuming he meant multiple containers like docker-compose or helm:
No, Launch Docker or our Custom-App alternative both do not allow more than one container to be specified.

We, and most likely iX as well, made the decision that allowing that about quadrupple the complication of both the GUI and the Helm backend, so decided that, in cases where multiple containers are needed, users should either build an App themselves or split the containers into seperate Apps by linking them as explained by @sretalla
 
Top