Sign inSign up

jlesage/baseimage

Sponsored OSS

By jlesage

•Updated 16 days ago

A minimal docker baseimage to ease creation of long-lived application containers

Image
10

100K+

jlesage/baseimage repository overview

⁠A minimal docker baseimage to ease creation of long-lived application containers

Release Build Status Donate

This is a Docker baseimage designed to simplify the creation of containers for any long-lived application.

⁠Images

This baseimage is available for multiple Linux distributions:

Base DistributionDocker Image Base TagSize
Alpine 3.16⁠alpine-3.16
Alpine 3.17⁠alpine-3.17
Alpine 3.18⁠alpine-3.18
Alpine 3.19⁠alpine-3.19
Alpine 3.20⁠alpine-3.20
Alpine 3.21⁠alpine-3.21
Alpine 3.22⁠alpine-3.22
Debian 10⁠debian-10
Debian 11⁠debian-11
Ubuntu 16.04 LTS⁠ubuntu-16.04
Ubuntu 18.04 LTS⁠ubuntu-18.04
Ubuntu 20.04 LTS⁠ubuntu-20.04
Ubuntu 22.04 LTS⁠ubuntu-22.04

Docker image tags follow this structure:

TagDescription
distro-vX.Y.ZExact version of the image.
distro-vX.YLatest version of a specific minor version of the image.
distro-vXLatest version of a specific major version of the image.

View all available tags on Docker Hub⁠ or check the Releases⁠ page for version details.

⁠Versioning

Images adhere to semantic versioning⁠. The version format is MAJOR.MINOR.PATCH, where an increment in the:

  • MAJOR version indicates a backward-incompatible change.
  • MINOR version indicates functionality added in a backward-compatible manner.
  • PATCH version indicates a bug fix in a backward-compatible manner.
⁠Content

The baseimage includes the following key components:

  • An initialization system for container startup.
  • A process supervisor with proper PID 1 functionality (e.g., process reaping).
  • Tools to simplify container creation.
  • An environment optimized for Dockerized applications.

⁠Getting started

Creating a Docker container for an application using this baseimage is straightforward. You need at least three components in your Dockerfile:

  • Instructions to install the application and its dependencies.
  • A script to start the application, stored at /startapp.sh in the container.
  • The name of the application.

Below is an example of a Dockerfile and startapp.sh for running a simple NodeJS web server:

Dockerfile:

# Pull the baseimage.
FROM jlesage/baseimage:alpine-3.19-v3

# Install http-server.
RUN add-pkg nodejs-npm && \
    npm install http-server -g

# Copy the start script.
COPY startapp.sh /startapp.sh

# Set the application name.
RUN set-cont-env APP_NAME "http-server"

# Expose ports.
EXPOSE 8080

startapp.sh:

#!/bin/sh
exec /usr/bin/http-server

Make the script executable:

chmod +x startapp.sh

Build the Docker image:

docker build -t docker-http-server .

Run the container, mapping ports for web access:

docker run --rm -p 8080:8080 docker-http-server

Access the HTTP server via a web browser at:

http://<HOST_IP_ADDR>:8080

⁠Documentation

Full documentation is available at https://github.com/jlesage/docker-baseimage⁠.

Tag summary

Content type

Image

Digest

sha256:7dd58c806…

Size

39 MB

Last updated

16 days ago

docker pull jlesage/baseimage:ubuntu-26.04-v3

This week's pulls

Pulls:

340

Sep 14 to Sep 20