Tebako is an executable packager designed to simplify the process of packaging applications that rely on an interpretive runtime, making distribution easier. It packages a set of files into a DwarFS file system for read-only purposes.
For more details, visit the Tebako website.
Tebako packages for Linux systems must be created on the same architecture and standard library implementation as the target system. For example:
-
x86_64/aarch64 packages require x86_64/aarch64 systems, respectively.
-
Packages compatible with GNU/musl Linux must be created in GNU/musl environments.
Installing Tebako on different Linux configurations can be cumbersome, and our testing is limited to a specific set of Ubuntu and Alpine configurations.
Tebako containers are available to support packaging for both GNU and musl target environments. The currently available tags are:
This container is based on Ubuntu 20.04 LTS, providing an environment for packaging applications for GNU systems that use the glibc
implementation of the C standard library.
The --patchelf
option enables the creation of packages that are forward-compatible with GNU Linux distributions running GLIBC version 2.31 and above.
Distribution | Minimal Supported Version | GLIBC Version |
---|---|---|
Ubuntu |
20.04 (Focal Fossa) |
GLIBC 2.31 |
Debian |
11 (Bullseye) |
GLIBC 2.31 |
Rocky Linux |
9 |
GLIBC 2.34 |
Fedora |
33 |
GLIBC 2.32 |
CentOS |
9 |
GLIBC 2.34 |
Red Hat Enterprise Linux (RHEL) |
9 |
GLIBC 2.34 |
Oracle Linux |
9 |
GLIBC 2.34 |
This container is based on Alpine Linux 3.17, offering an environment for packaging applications for systems that use the musl
implementation of the C standard library.
Both containers are available on the GitHub Container Registry (GHCR) for x86_64 (amd64) and aarch64 (arm64) architectures, with multi-architecture manifests. These containers come preinstalled with Tebako packaging environments for Ruby versions 3.2.6 and 3.3.6.
There are two primary methods for packaging with Tebako:
-
From outside the container: Using Docker commands to package your application without entering the container.
-
From inside the container: Interactively working within the container to package your application.
You can package your application from outside the container by running a single Docker command. This command mounts your workspace into the container and executes the tebako press
command, specifying:
-
Application root
-
Entry point
-
Output location
-
Ruby version
$ docker run -v <application_folder>:/mnt/w \
-t ghcr.io/tamatebako/tebako-${{ container_tag }}:latest \
tebako press <tebako press parameters>
fontist
Gem from Outside the ContainerTo package the fontist
gem, a Ruby application for managing fonts, located in the fontist/
directory under the current working directory, use the following command:
docker run -v $PWD:/mnt/w \
-t ghcr.io/tamatebako/tebako-ubuntu-20.04:latest \
tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.6
To package your application from inside the Tebako container, follow these steps:
-
Pull the Tebako container image:
$ docker pull ghcr.io/tamatebako/tebako-<container_tag>:latest
Replace
<container_tag>
with the desired container tag (e.g.,ubuntu-20.04
oralpine-3.17
). -
Start and enter the container interactively:
$ docker run -it --rm -v <application_folder>:/mnt/w ghcr.io/tamatebako/tebako-<container_tag>:latest bash
Replace
<container_tag>
with the appropriate tag and<application_folder>
with the path to your application folder. -
Once inside the container, run the
tebako press
command:$ tebako press <tebako press parameters>
fontist
Gem from Inside the ContainerTo package the fontist
gem, located in the fontist/
directory under the current working directory, use the following commands:
# Start and enter the container
$ docker run -it --rm -v $PWD:/mnt/w ghcr.io/tamatebako/tebako-<container_tag>:latest bash
# Run this after entering the container
$ tebako press --root=/mnt/w/fontist --entry-point=fontist --output=/mnt/w/fontist-package --Ruby=3.2.6
Gemspec
files often specify the files included in the gem using git ls-files
. When packaging from inside the container, the container’s instance of git
will be used to resolve these files.
If you use a mounted host directory for packaging, the container’s instance of git
will not have access to it by default. To resolve this, you must alter the container’s configuration by running the following command before packaging:
git config --global --add safe.directory <source>
However, to avoid this additional setup, we recommend packaging from outside the container instead of modifying the container’s configuration as described above.
Packaging from inside the container is primarily designed to support CI environments like GitHub Actions (GHA) or Cirrus CI. It provides a complete packaging environment that does not require any additional installations, making it ideal for automated workflows.
-
Tebako CI Containers GitHub Actions workflow includes examples featuring packaging of fontist gem.
-
Tebako samples repository includes tutorial with basic Tebako CI containers examples and advanced workflows that show how to package Sinatra and Ruby on Rails applications.