Full Container Base Images
The full Garden Linux container images provide a complete Linux environment with package manager access.
Prerequisites
Before starting, you'll need:
- A container runtime: Podman or Docker
- Familiarity with
ContainerfileorDockerfilesyntax - For bare images with pip/npm dependencies: basic understanding of multi-stage builds
TIP
This guide uses podman commands throughout. If you use Docker, replace podman with docker — the commands are interchangeable.
Choosing a Version
Choose a version by looking at the Garden Linux Container Image Reference.
Basic Containerfile Example
Use the full Garden Linux container as a base for applications that need a standard Linux environment:
dockerfile
FROM ghcr.io/gardenlinux/gardenlinux:2150.0.0
# Install additional packages
RUN apt-get update && apt-get install -y --no-install-recommends \
nginx \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy application files
COPY nginx.conf /etc/nginx/nginx.conf
COPY index.html /var/www/html/
# Set runtime configuration
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Installing Additional Packages
The full container image includes apt, allowing you to install packages at build time:
dockerfile
FROM ghcr.io/gardenlinux/gardenlinux:2150.0.0
RUN apt-get update && apt-get install -y --no-install-recommends \
<your-packages> \
&& rm -rf /var/lib/apt/lists/*WARNING
Always include rm -rf /var/lib/apt/lists/* at the end of apt-get commands to reduce image size.
Further Reading
- unbase_oci GitHub Repository — Tool for creating bare container images