Building container images is simple and easy... until it's not. Providing a consistent set of packages and configurations across multiple distributions or versions of distributions becomes increasingly complex, especially with an eye toward optimizing for image layers.
If you're tired of copy-pasting distro-specific syntax to update or install
packages for your container images, then package
might be a welcome change.
Supported distributions:
- Alpine Linux
- Debian Linux and derivitives using the
apt
package manager
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# Update installed packages
RUN package update
# Install packages
RUN package install bash cowsay
docker build --build-arg BASE_IMAGE=alpine cowsay:alpine
docker build --build-arg BASE_IMAGE=debian cowsay:debian
docker build --build-arg BASE_IMAGE=ubuntu cowsay:ubuntu