No description
|
||
---|---|---|
rootdir/etc | ||
.woodpecker.yaml | ||
build.sh | ||
Dockerfile.base | ||
Dockerfile.java | ||
Dockerfile.node | ||
README.md | ||
renovate.json |
Distroless - Minimal Base, Java and Node Images
A small set of Dockerfiles and a build script to produce minimal BusyBox-based base and Java images. The goal is a tiny runtime image that includes only what's necessary to run typical Linux binaries or a JRE.
Quick summary
Dockerfile.base
— builds a compact base image (BusyBox + glibc, CA certs, selected tzdata, minimal /etc files).Dockerfile.java
— extends the base image with OpenJDK to produce a minimal Java runtime image.Dockerfile.node
— produces a minimal Node.js runtime image.build.sh
— convenience script to build images and run quick smoke tests.
Prerequisites
- Docker (engine) installed and running.
- A POSIX-compatible shell for
build.sh
Quickstart
From the repository root run the provided script which builds images and performs small verification steps:
./build.sh
What the Dockerfiles include
-
Dockerfile.base
- BusyBox userland and a glibc runtime (to allow running typical Linux binaries built against glibc).
- CA certificates so HTTPS works from the image.
- A small set of
/etc
files (passwd, group) and selected time zones (e.g. Paris, UTC, New_York) to reduce image size.
-
Dockerfile.java
- Adds a minimal OpenJDK distribution (JRE) on top of the base image.
- Sets PATH and JAVA_HOME as needed for the runtime.
- JAVA_VERSION can be set as a build argument.
-
Dockerfile.node
- Adds a minimal Node.js on top of the base image.
- NODE_VERSION can be set as a build argument.