Sign inSign up

arsscriptum/baseimage

By arsscriptum

•Updated over 1 year ago

Image
0

1.2K

arsscriptum/baseimage repository overview

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

This is a docker baseimage that can be used to create containers for any long-lived application.

⁠Images

Multiple docker images, based on different Linux distributions, are available:

Base DistributionDocker Image Base TagSize
Alpine 3.16⁠alpine-3.164.1M
Alpine 3.17⁠alpine-3.174.6M
Alpine 3.18⁠alpine-3.184.6M
Alpine 3.19⁠alpine-3.194.8M
Alpine 3.20⁠alpine-3.204.8M
Alpine 3.21⁠alpine-3.214.8M
Debian 10⁠debian-1026.4M
Debian 11⁠debian-1129.2M
Ubuntu 16.04 LTS⁠ubuntu-16.0445.4M
Ubuntu 18.04 LTS⁠ubuntu-18.0425.6M
Ubuntu 20.04 LTS⁠ubuntu-20.0427.7M
Ubuntu 22.04 LTS⁠ubuntu-22.0429.7M
⁠Content

Here are the main components of the baseimage:

  • An init system.
  • A process supervisor, with proper PID 1 functionality (proper reaping of processes).
  • Useful tools to ease container building.
  • Environment to better support dockerized applications.
⁠Versioning

Images are versioned. Version number follows the semantic versioning⁠. The version format is MAJOR.MINOR.PATCH, where an increment of the:

  • MAJOR version indicates that a backwards-incompatible change has been done.
  • MINOR version indicates that functionality has been added in a backwards-compatible manner.
  • PATCH version indicates that a bug fix has been done in a backwards-compatible manner.
⁠Tags

The baseimage is available under multiple tags. A tag is made from the corresponding Linux distribution and the release version.

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.

⁠Getting started

The Dockerfile for your application can be very simple, as only three things are required:

  • Instructions to install the application.
  • A script that starts the application (stored at /startapp.sh in container).
  • The name of the application.

Here is an example of a docker file that would be used to run a simple web NodeJS server. In Dockerfile:

# Pull base image.
FROM arsscriptum/baseimage:alpine-3.15-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 name of the application.
RUN set-cont-env APP_NAME "http-server"

# Expose ports.
EXPOSE 8080

In startapp.sh:

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

Then, build your docker image:

docker build -t docker-http-server .

And run it:

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

You should be able to access the HTTP server by opening in a web browser:

http://[HOST IP ADDR]:8080

Tag summary

Content type

Image

Digest

sha256:c2c91da67…

Size

4.8 MB

Last updated

over 1 year ago

docker pull arsscriptum/baseimage:alpine-3.20-2