You are here
Christian - Wed, 2017/07/05 - 13:57
Hi,
say I would like to create an TKL appliance of https://github.com/humhub/humhub. I have successfully created the recipe for a Docker image (https://github.com/cboulanger/humhub-docker) and understand how that works. I know there is https://www.turnkeylinux.org/docs/howto-build-isos-with-tkldev 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....
Forum:
Most of it could be recycled, just the layout is different
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.
Thank you, Jeremy,
for your detailed explanations - very much appreciated! This encourages me to give TKLDev a try (might take a few more weeks, though!).
Good news!
Add new comment