Christian's picture


say I would like to create an TKL appliance of I have successfully created the recipe for a Docker image ( and understand how that works.  I know there is and I am willing to try that eventually. Since this woud be quite motivating, I wonder if there is anything I can reuse from the Dockerfile in the process of creating the new ISO....




Jeremy Davis's picture

TBH, I don't know much about docker files and have never used them. But from a glance, it appears to essentially just be a install script with some idiosyncrasies.

Whilst on face value our buildcode looks very different. Essentially, it's just a collection of packages to install, files to overlay and install/configuration BASH script(s). These components are applied in that order.

The package names noted in the plan (plan/main) are installed via apt. Note only packages from Debian main & security and TurnKey main and security are installable at this point. If you want/need to add additional repos, they need to be handled within the conf script.

Overlay files are found in /overlay and are copied over the filesystem relative to root. E.g. post build, overlay/etc/something.conf will be found at /etc/something.conf within the built ISO.

Conf scripts (in conf.d/) are run in alphanumeric order (note they need to be executable) within the build chroot.

So looking at your docker file, it seems to me that the packages you want installed could just go straight to the plan. And most of the rest of the commands could be copy pasted into a conf script. Obviously don't include the RUN prefix.

FWIW, you'll notice that most appliances have only 1 or 2 conf scripts. As a general rule we separate out the third party downloads to their own conf file (conf.d/downloads), then everything else goes into another script (conf.d/main). As an example, mediawiki/conf.d/downloads and mediawiki/conf.d/main.

It doesn't look like it applies to this particular appliance, but for particularly complex installs, the scripts can be further broken up if desired (e.g. gitlab/conf.d/).

Just keep in mind that the conf scripts are executed in alphanumeric order.

I'd also suggest that you have at least a quick browse through the TKLDev docs.

Christian's picture

for your detailed explanations - very much appreciated! This encourages me to give TKLDev a try (might take a few more weeks, though!). 

Jeremy Davis's picture

Awesome. Good luck with it and please feel free to post any further questions or concerns you might have along the way.

Add new comment