Skip to content

Architecture

How daemonless container images are layered.

Image Layers

flowchart LR
    base_core["base-core<br/><small>4 images</small>"]
    base_exec["base-exec<br/><small>72 images</small>"]
    base_rcd["base-rcd<br/><small>16 images</small>"]
    base["base<br/><small>4 images</small>"]
    arr_base["arr-base<br/><small>4 images</small>"]
    nginx_base["nginx-base<br/><small>9 images</small>"]
    nginx["nginx<br/><small>18 images</small>"]
    postgres["postgres<br/><small>2 images</small>"]
    node["node"]
    python["python"]
    base_core --> base_exec
    base_core --> base_rcd
    base_core --> base
    base_exec --> arr_base
    base_rcd --> nginx_base
    base_exec --> nginx
    base_exec --> postgres
    base_core --> node
    base_core --> python
    classDef baseStyle fill:#ab2b28,stroke:#333,color:#fff
    classDef intermediateStyle fill:#d35400,stroke:#333,color:#fff
    class base_core,base_exec,base_rcd,base baseStyle
    class arr_base,nginx_base,nginx,postgres,node,python intermediateStyle

Base Layer

Image Built on What it gives you
base-core - FreeBSD userland and pkg. No init: tool images and the other bases start here.
base-exec base-core One process per container. /init runs the setup scripts, then execs the app as bsd. Podman, AppJail or Kubernetes restart it.
base-rcd base-core Several services in one container, supervised by rcd(8).
base base-core The original s6 base. Kept for images built outside daemonless; new images don't use it.

base-exec is the default. The app is the container's command (CMD), so its exit is the container's exit, and the runtime does the restarting, stopping, health checks and logs. Appliances that bundle several services (an app behind nginx, an app with its own database) use base-rcd, where rcd starts the services in order and restarts any that crash.

Both run the same setup before the app starts: PUID/PGID remap the bsd user, then the scripts in /daemonless/init.d and your own in /daemonless/custom.d. See Development for how an image is put together.

Intermediate Layers

Image Built on Purpose
arr-base base-exec .NET runtime for the *arr apps
nginx-base base-rcd nginx in front of an app (rcd runs both)
nginx base-exec nginx serving static sites
postgres base-exec PostgreSQL
node base-core Node.js toolchain
python base-core Python toolchain

Build Order

When an image changes, the images built on it are rebuilt:

  1. base-core changes: rebuild everything
  2. base-exec or base-rcd changes: rebuild the images on it
  3. An intermediate image changes: rebuild its children only

Images by Parent

Each parent is indented under the image it is built on.