- Python 46.8%
- Dockerfile 37.5%
- Shell 15.7%
| .forgejo/workflows | ||
| base | ||
| cloud | ||
| docker | ||
| supervisor | ||
| workstation | ||
| .gitignore | ||
| extract | ||
| LICENSE | ||
| README.md | ||
gorgeOS (containerized operating system)
A collection of bootc images, that are base for deployments as VM and on bare metal.
More background on the design decisions and CI setup for these images: ([https://blog.m1ch.eu/tags/bootc/])
Images
- base: Base for all other images; Install all common software.
- cloud: Image to be deployed as a VM.
- docker: Run docker, or docker swarm applications.
- cloud: Image to be deployed as a VM.
Folder structure
The images are separated in folders. Each folder has the same name as the image that will be build.
This is an explanation of the most important files and folders. Details for each image are explained in the according folder.
Containerfile
The central file for each build. It defines what the image contains.
files (folder)
Folder that will be copied to the image root.
If an empty folder shall be copied to the image, it shall contain an empty
file with the name .gitkeep, so it will be present in the repository.
__ (double underscore) in file- and folder-names will be replaced with
a path separator /, during copying.
Here is the code snipped, that has to be present in each containerfile, that the files are copied.
RUN --mount=ro,relabel=shared,type=bind,source=/files,target=files \
find files -mindepth 1 -type d | sed -e 's/^files/mkdir -p /' -e 's|__|/|g' | bash && \
find files -mindepth 1 -type f -name "*__*" \
| sed -e 's!^files\(.*\)__.*$!mkdir -p $(echo \1 | sed -e "s|__|/|g" )!' \
| bash && \
find files -mindepth 1 -type f -not -name .gitkeep \
| sed -e 's!^files\(.*\)!cp files\1 $(echo \1 | sed -e "s|__|/|g" )!' \
| bash && \
find /usr/local/bin -type f -exec chmod 555 {} \; && \
find /usr/local/sbin -type f -exec chmod 550 {} \;
scripts (folder)
Scripts contains all files that are only required at buildtime and are not present in the final image.
Use following code snipped for the scripts folder to be present during a RUN-command:
RUN --mount=ro,relabel=shared,type=bind,source=/scripts,target=scripts [commands]
Build the image
I use here podman to build the images. It is also possible to use any other OCI-compatible builder. For example docker.
Here an example to build the base image:
podman build -t localhost/base:latest base
The result is an ordinary container-image, that can be run as
podman run --rm -it localhost/base:latest bash
Note: Even thou it runs as an ordinary image, not all files and folders are available!