SkillAgentSearch skills...

Containerfiles

Containerfiles including AI, game servers, bootc and even a rickroll.

Install / Use

/learn @cdrage/Containerfiles
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Containerfiles

           +--------------+
          /|             /|
         / |            / |
        *--+-----------*  |
        |  |           |  |
        |  |           |  |
        |  |           |  |
        |  +-----------+--+
        | /            | /
        |/             |/
        *--------------*

All the Containerfiles I use.

Notes:

  • Pushed to ghcr.io/ GitHub image registry, EXCEPT for bootc- directories.
  • bootc directories are special and are not pushed, they use Fedora bootc
  • kasm directories are "typical desktop software ran through VNC". Some are custom.
  • Scroll down on how to run it.
  • Containers can be started by using simple variables.
  • You may also git clone https://github.com/cdrage/containerfiles and build it yourself (podman build -t username/container . or docker build -t username/container).

Descriptions: Below is a general overview (with instructions) on each Docker container I use. This is automatically generated from the comments that I have left in each Containerfile.## Table of Contents

aviation-checklist

Description:

Used to generate aviation checklists. Based on the work by https://github.com/freerobby/aviation-checklist with the patch https://github.com/freerobby/aviation-checklist/pull/2

Running:

podman run -d \
  -p 8080:80 \
  --name aviation-checklist \
  ghcr.io/cdrage/aviation-checklist

bootc-httpd-centos

Description:

IMPORTANT NOTE: This is BOOTC. This is meant for bootable container applications. See: https://github.com/containers/podman-desktop-extension-bootc

   .---.
  / ᵔᴥᵔ \
>(       )
  '-----'
 ____________
|          / |
|  (ᵔᴥᵔ)   | |
|  bootc   | |
|__________|/

This Containerfile creates a simple httpd server on CentOS Stream 9. So you can run a web server on boot. This will be accessible on port 80.

Running:

  1. Boot OS
  2. Visit <ip>:80

bootc-httpd-fedora

Description:

IMPORTANT NOTE: This is BOOTC. This is meant for bootable container applications. See: https://github.com/containers/podman-desktop-extension-bootc

This Containerfile creates a simple httpd server on Fedora. So you can run a web server on boot. This will be accessible on port 80.

Running:

  1. Boot OS
  2. Visit <ip>:80

bootc-k3s-master

Description:

IMPORTANT NOTE: This is BOOTC. This is meant for bootable container applications. See: https://github.com/containers/podman-desktop-extension-bootc

   .---.
  / ᵔᴥᵔ \
>(       )
  '-----'
 ____________
|          / |
|  (ᵔᴥᵔ)   | |
|  bootc   | |
|__________|/

This Containerfile creates a k3s master on AMD64 bootc fedora 42 image. So you can run a k8s server on boot.

In my setup, I have networking done on the ROUTER side where it will automatically assign an IP address based on the MAC. It is ideal to take note of this IP address as it will be needed for the nodes to join the cluster.

PRIVATE REGISTRY: If you want to pull from a private registry. Uncomment the "COPY auth.json /etc/ostree/auth.json" line and add your auth.json file. this auth.json file is typically found in ~/.config/containers/auth.json for podman users. Expanding your rootfs:

  • If you want your OS to expand it's rootfs automatically, ENABLE THIS # RUN systemctl enable bootc-generic-growpart.service from the Containerfile.
  • This is disabled by default as it can be dangerous if you are not using a VM or a disk that can be expanded.
  • This is good for situations like cloud providers, usb sticks, etc.

GPU:

  • Want GPU? Change the FROM to foo.bar/yourusername/bootc-nvidia-base-centos / see bootc-nvidia-base-centos folder for more details.
  • GPU drivers will be built + loaded on each boot.
  • This README is outside of the scope of how to use GPU with k3s, but view the k3s advanced docs for more information: https://docs.k3s.io/advanced#nvidia-container-runtime-support read it thoroughly as you WILL need nvidia-device-plugin installed and modified to ensure it has runtimeClassName set.

Notes:

  • The default user is root, and the ssh key is placed in /usr/ssh/root.keys this is enabled so we can scp / ssh and get the kubeconfig file (/etc/rancher/k3s/k3s.yaml)
  • k3s is loaded with NO INGRESS / Traefik as I prefer using nginx-ingress. See the systemd k3s.service file for more details.
  • k3s is loaded with NO LOADBALANCER. I use metallb locally, and I have added --disable=servicelb to the systemd service file

Arguments are required in order to build this image with both your k3s K3S_TOKEN and your SSH public key. To do this, you must have the following (you can pass in this via --build-arg foo=bar on the CLI):

  • HOSTNAME=k8smaster
  • K3S_TOKEN=MySuperSecretK3sToken
  • SSH_PUBLIC_KEY=MySSHPublicKeyNOTThePrivateKey
  • K8S_VERSION=1.29.4

Important note, IGNORE the errors about K3S_URL when building unless you want to do a HA setup. This is not needed for a single node setup.. If you want to do HA read below.

Running etcd: You will have to modify the cluster to use --cluster-init to initially start. Modify the lib/systemd/system/k3s.service file to include the --cluster-init flag.

HA:

  1. Read the instructions here for adding additional servers (you'll be required to also pass in -server): https://docs.k3s.io/datastore/ha-embedded
  2. When building, supply K3S_URL, this will be the URL of the master node. This is required for the other nodes to join the cluster. This will automatically let you start joining the cluster.

Running:

  1. Create disk image using the above extension
  2. Boot OS
  3. See that it creates the k3s server on boot
  4. To test the k8s server, you can retrieve the kubeconfig file from /etc/rancher/k3s/k3s.yaml from within the server (scp, ssh, etc.)
  5. Then use kubectl to interact with the server Not needed if only using 1 master / no HA.

bootc-k3s-node

Description:

IMPORTANT NOTE: This is BOOTC. This is meant for bootable container applications. See: https://github.com/containers/podman-desktop-extension-bootc

   .---.
  / ᵔᴥᵔ \
>(       )
  '-----'
 ____________
|          / |
|  (ᵔᴥᵔ)   | |
|  bootc   | |
|__________|/

This Containerfile creates a k3s NODE on AMD64 using Fedora 42. So you can run a k8s server on boot.

You must know the IP address of the master in order for these nodes to connect. PRIVATE REGISTRY: If you want to pull from a private registry. Uncomment the "COPY auth.json /etc/ostree/auth.json" line and add your auth.json file. this auth.json file is typically found in ~/.config/containers/auth.json for podman users. Expanding your rootfs:

  • If you want your OS to expand it's rootfs automatically, ENABLE THIS # RUN systemctl enable bootc-generic-growpart.service from the Containerfile.
  • This is disabled by default as it can be dangerous if you are not using a VM or a disk that can be expanded.
  • This is good for situations like cloud providers, usb sticks, etc.

GPU:

  • Want GPU? Change the FROM to foo.bar/yourusername/bootc-nvidia-base-centos / see bootc-nvidia-base-centos folder for more details.
  • GPU drivers will be built + loaded on each boot.
  • This README is outside of the scope of how to use GPU with k3s, but view the k3s advanced docs for more information: https://docs.k3s.io/advanced#nvidia-container-runtime-support read it thoroughly as you WILL need nvidia-device-plugin installed and modified to ensure it has runtimeClassName set.

Notes:

  • The default user is root, and the ssh key is placed in /usr/ssh/root.keys this is enabled so we can scp / ssh and get the kubeconfig file (/etc/rancher/k3s/k3s.yaml)
  • a unique hostname must be set or else it is rejected by the master k3s server for being not unique

Arguments are required in order to build this image with both your k3s token and your SSH public key. To do this, you must have the following (you can pass in this via --build-arg foo=bar on the CLI):

  • HOSTNAME=k8snode1
  • K3S_URL=https://k8smaster:6443
  • K3S_TOKEN=MySuperSecretK3sToken
  • SSH_PUBLIC_KEY=MySSHPublicKeyNOTThePrivateKey
  • K8S_VERSION=1.29.4

Running:

  1. Create disk image using the above extension
  2. Boot OS
  3. See that it creates the k3s agent on boot / connects to the k8s server
  4. use kubectl get nodes and you should see your server. COPY auth.json /etc/ostree/auth.json

bootc-nvidia-base-fedora

Description:

IMPORTANT NOTE: This is BOOTC. This is meant for bootable container applications. See: https://github.com/containers/podman-desktop-extension-bootc

   .---.
  / ᵔᴥᵔ \
>(       )
  '-----'
 ____________
|          / |
|  (ᵔᴥᵔ)   | |
|  bootc   | |
|__________|/

This is a "base" container that installs the nvidia drivers and the nvidia container toolkit. This is meant to be used as a base for other containers that need GPU access.

DISABLE SECURE BOOT! You have been warned! Disable boot is KNOWN to cause issues with the nvidia drivers. ENABLE 4G DECODING in the BIOS. This is needed f

View on GitHub
GitHub Stars38
CategoryDevelopment
Updated5d ago
Forks7

Languages

Dockerfile

Security Score

80/100

Audited on Mar 31, 2026

No findings