Sign inSign up

kgrv/mini

By kgrv

Updated about 1 month ago

A minimal layered image with tini, ca-certificates, mimalloc, busybox, and su-exec.

Image
Operating systems
0

9.5K

kgrv/mini repository overview

DESCRIPTION

A minimal layered image with tini, ca-certificates, mimalloc, busybox, and su-exec.

SUPPORTED TAGS

RECOMMEND

Tip

LAYERS

TagsAMD64ARM64Description
* sh2.48 MB2.82 MBLayer on mi with busybox, su-exec
mi1.53 MB1.60 MBLayer on ca with mimalloc
ca426 KB433 KBLayer on tn with ca-certificates
tn208 KB216 KBLayer on fs with tini

0.5.0 - 2026-04-19

* Interactive minimal distroless, consider kgrv/alpine when a package manager is needed.

SUPPORTED ARCHITECTURES

OS/ARCHDescription
linux/amd6464-bit x86 architecture for Linux operating systems
linux/arm6464-bit ARM architecture for Linux operating systems

PARAMETERS

TypeContainerAvailabilityFunction
Volume/mnt>= fsOptional Bind mount volume
EnvironmentEUID>= shOptional Effective User ID
EnvironmentEGID>= shOptional Effective Group ID
EnvironmentUMASK>= shOptional Default permissions
EnvironmentSUGGEST>= shOptional Set suggestion messages
EnvironmentFALLBACK_CMD>= shOptional Set command when empty

OVERVIEW

Dockerfile

KeywordAvailabilityConfiguration
SHELL>= tn[ "/bin/ash", "-euxo", "pipefail", "-c" ]
ENV>= tnPATH_APP=/app
ENV>= tnPATH_CONFIG=/config
ENV>= tnPATH_DATA=/data
ENV>= tnPATH_HOME=/mini
ENV>= tnPATH_MNT=/mnt
ENV>= tnLD_LIBRARY_PATH=/app/lib:/usr/local/lib
ENV>= tnPATH=/app/bin:${PATH}
ENV>= tnXDG_CONFIG_HOME=/config
ENV>= tnXDG_DATA_HOME=/data
ENV>= tnHOME=/mini
ENV>= tnUSER=mini
WORKDIR>= tn${PATH_MNT} -> /mnt
ENTRYPOINT>= tn[ "tini", "--" ]
ENV>= miLD_PRELOAD=/usr/lib/libmimalloc.so
ENTRYPOINT>= sh[ "tini", "--", "enpt" ]

User / Group ID

  • EUID / EGID environment variables
  • mini:mini as default

Mask

  • UMASK defaults to 0022

Suggestion

  • SUGGEST defaults to true

USAGE

Dockerfile

FROM kgrv/mini
Init
  • Utilize tini by using CMD without overriding ENTRYPOINT
FROM kgrv/mini:static AS develop
...
CMD [ "nreq", "--debug" ]
  • Override ENTRYPOINT with "tini", "--"
FROM kgrv/mini:static AS develop
...
ENTRYPOINT [ "tini", "--", "nreq" ]
CMD [ "--debug" ]
Principle of Least Privilege
  • Applicable to sh > TAG >= fs. Add USER before ENTRYPOINT.
FROM kgrv/mini:static AS staging
...
USER mini
ENTRYPOINT [ "tini", "--", "nreq" ]
  • Applicable to >= sh. Override ENTRYPOINT with "tini", "--", "enpt".
FROM kgrv/mini:sh AS develop
...
ENTRYPOINT [ "tini", "--", "enpt", "nreq" ]
CMD [ "--debug" ]

Application Init/Entrypoint Script

enpt loads the first ash script found in the following orders:

  • /app/init.sh
  • /app/docker-entrypoint.sh

Time Zone

  • Mount system /etc/localtime or /usr/share/zoneinfo
docker run -it -v /etc/localtime:/etc/localtime:ro kgrv/mini
docker run -it -v /usr/share/zoneinfo/US/Eastern:/etc/localtime:ro kgrv/mini

Docker CLI

Note

Only sh has an interactive shell ash.

docker run -it kgrv/mini
Start container with bind mount
docker run -it -v $(pwd):/mnt kgrv/mini
Start container with UID / GID

Important

Argument --user is not supported, please use EUID/EGID.

Note

Only applicable to sh.

docker run -it -e EUID=$(id -u) -e EGID=$(id -g) kgrv/mini
Start container as ROOT

Note

Only applicable to sh.

docker run -it kgrv/mini --BECOME_ROOT

Custom Commands

arcm
  • Map different architecture keywords for CI/CD
    A script to map different architecture keywords.

    USAGE: arcm ARCH

    ARGUMENTS:
        ARCH    returns ARCH when no match:
                    aarch64, arm64, x86_64, amd64
                    amd64-n, amd64-x

    RETURNS:
        arm64   <->  aarch64
        amd64   <->  x86_64
        amd64-n  ->  x64
        amd64-x  ->  x86_64
  • Particularly helpful in Dockerfile
...
RUN ARCH="$(arcm ${TARGETARCH})" && \
    wget -nv "https://static.rust-lang.org/rustup/dist/${ARCH}-unknown-linux-musl/rustup-init" && \
...
enpt

Important

Ensure that root (0) user is executing the command.

  • Entrypoint script to be used in Dockerfile
FROM kgrv/mini:sh AS develop
...
ENTRYPOINT [ "tini", "--", "enpt", "nreq" ]
CMD [ "--debug" ]
os-release
  • Display information
    mini 0.5.0
    + busybox 1.37.0
    + ca-certificates 20260413
    + mimalloc 3.3.0
    + su-exec 0.3
    + tini 369448a1
    Build sh_2026-04-19T07:46:32Z (aarch64)

Custom Scripts

ansi-colors
  • Add ANSI colors to shell scripting
#!/bin/ash
set -euo pipefail
. ansi-colors
...

Tag summary

Content type

Image

Digest

sha256:0c5cb7d73

Size

1.3 MB

Last updated

about 1 month ago

docker pull kgrv/mini