Module entry point

The __init__.py simply re-exports the Lib class:

"""Reusable container helpers: base images, timezone, user setup, DinD, etc."""

from .main import Lib as Lib

The main.py defines the @object_type class that composes all the functions defined in the use-case org files. Besides image versions, the class carries a default_username field so the container user is defined once and overridable globally — individual functions default to None and fall back to self.default_username. The timezone field (default Europe/Paris) controls which timezone is set in all container variants.

"""Reusable container helpers: base images, timezone, user setup, DinD, etc."""

from dagger import object_type

from .alpine import AlpineMixin
from .debian import DebianMixin
from .dind import DindMixin
from .distroless import DistrolessMixin
from .flask_venv import FlaskMixin
from .pins import PinsMixin
from .pip_tools import PipToolsMixin
from .python import PythonMixin
from .ralph import RalphMixin
from .user import UserMixin


@object_type
class Lib(
    AlpineMixin,
    DebianMixin,
    DistrolessMixin,
    UserMixin,
    PythonMixin,
    DindMixin,
    FlaskMixin,
    PipToolsMixin,
    PinsMixin,
    RalphMixin,
):
    alpine_version: str = "3.23"
    debian_version: str = "13"
    debian_min_version: str = "2"
    pip_tools_python_version: str = "3.12"
    default_username: str = "sam"
    timezone: str = "Europe/Paris"
    dind_ubuntu_image: str = "ubuntu:24.04"
    dind_image: str = "docker:27-dind"

    @property
    def debian_tag(self) -> str:
        return f"{self.debian_version}.{self.debian_min_version}-slim"

Author: root

Created: 2026-04-18 Sat 21:16

Validate