Sign inSign up

samtechrepo/ubuntu-22.04-jammy

By samtechrepo

Updated about 2 months ago

Image Ubuntu 22.04 minimale et durcie, multi-arch, utilisateur non-root, prête pour la production.

Image
Security
Operating systems
0

489

samtechrepo/ubuntu-22.04-jammy repository overview

Docker Ubuntu 22.04 LTS (Jammy) - Sam Tech Lab

Docker Pulls Docker Stars GitHub License: MIT Build multi-arch - Monthly Vulnerability Scan - Weekly


Overview

This image provides a clean, stable, and minimal Ubuntu 22.04 (Jammy) base to build production-ready Docker containers. It is built from scratch using the official Ubuntu OCI rootfs, ensuring authenticity, lightness, and reproducibility.

Automatic monthly updates: The image is rebuilt every month with the latest Ubuntu updates and security patches.

Designed to be secure, fast, and multi-purpose, it includes advanced APT optimizations, a non-root user, and system hardening for maximum reliability.

Supported architectures: amd64 and arm64


Key Features

  • "FROM scratch" image - minimal size, built from the official Ubuntu OCI rootfs
  • Multi-arch publishing (amd64, arm64) as a single manifest
  • APT & dpkg optimization - no recommended packages, clean cache
  • Automatic service blocking (systemd, upstart)
  • Non-root user (appuser) for safer container execution
  • Full cleanup of /tmp, /var/log, /var/lib/apt/lists
  • Locale & timezone configured (en_US.UTF-8, UTC)
  • System hardening:
    • root account locked
    • unnecessary SUID/SGID bits removed
    • default umask 027
  • PUID/PGID variables for the non-root user's UID/GID
  • Automated monthly rebuilds, linted with hadolint
  • Trivy vulnerability scans (SARIF + JSON reports)

Included Packages

CategoryPackages
Base utilitiesbash, cron, curl, gnupg, jq, netcat-openbsd, tzdata
System supportapt-utils, ca-certificates, locales

Environment Variables

VariableDefault valueDescription
PUID1000Non-root user ID
PGID1000Non-root group ID
HOME/configHome directory for appuser
LANGen_US.UTF-8Default locale
TZUTCDefault timezone
DEBIAN_FRONTENDnoninteractiveDisables interactive APT prompts

Base Specifications

FieldValue
OSUbuntu 22.04 (Jammy)
Architecturesamd64, arm64
SourceUbuntu OCI RootFS
MaintainerSam Tech Lab
LicenseMIT
Update frequencyMonthly (automated)

Available Tags

RegistryTagArchitecture
Docker Hubsamtechrepo/ubuntu-22.04-jammy:latestamd64 + arm64
Docker Hubsamtechrepo/ubuntu-22.04-jammy:YYYY.MMamd64 + arm64
GHCRghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:latestamd64 + arm64
GHCRghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:YYYY.MMamd64 + arm64

These tags point to a multi-architecture manifest: Docker automatically pulls the image matching the local platform.


Dockerfile Source

For the full security baseline and reporting policy, see SECURITY.md.

Want to contribute? See CONTRIBUTING.md and the CODE_OF_CONDUCT.md.


Usage Examples

1. Run an interactive container
docker run -it --rm samtechrepo/ubuntu-22.04-jammy:latest /bin/bash
2. Simple Dockerfile
FROM samtechrepo/ubuntu-22.04-jammy:latest

# The base image runs as non-root (`USER appuser`) by default, so package
# installation must happen as root during the build, then drop back down.
USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends nginx && \
    rm -rf /var/lib/apt/lists/* && \
    sed -i 's/80 default_server;/8080 default_server;/g' /etc/nginx/sites-enabled/default && \
    sed -i '/^user /d' /etc/nginx/nginx.conf && \
    sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#' /etc/nginx/nginx.conf && \
    ln -sf /dev/stdout /var/log/nginx/access.log && \
    ln -sf /dev/stderr /var/log/nginx/error.log && \
    chown -R appuser:appuser /var/lib/nginx
USER appuser

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

This Dockerfile creates a custom image based on ghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:latest with NGINX preinstalled. NGINX listens on port 8080 instead of the default 80, since binding to a privileged port (< 1024) requires root, which this container intentionally does not run as.

You can then build and test it locally:

docker build -t my-nginx .

docker run -d -p 8080:8080 my-nginx

⚠️ Do not install packages at container startup (e.g. via a command: running apt-get install) - since the image runs as a non-root user by default, apt-get will fail with Permission denied on /var/lib/apt/lists. Always install packages at build time, in your own Dockerfile, as shown above.

3. Example with Docker Compose

Use the custom Dockerfile from the previous example as the build context. Create a file named docker-compose.yml next to it:

services:
  web:
    build: .
    container_name: nginx-web
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      TZ: "Europe/Paris"

Then start the container:

docker compose up -d

This builds the custom NGINX image on top of the Sam Tech Lab base, and launches the web server at http://localhost:8080.

To stop the container:

docker compose down

Présentation

Cette image fournit une base Ubuntu 22.04 (Jammy) propre, stable et minimaliste pour construire des conteneurs Docker de production. Elle est construite from scratch à partir du rootfs officiel Ubuntu OCI, garantissant authenticité, légèreté et reproductibilité.

Mises à jour automatiques mensuelles : L'image est reconstruite chaque mois avec les dernières mises à jour et correctifs de sécurité Ubuntu officiels.

Conçue pour être sécurisée, rapide et multi-usage, elle inclut des optimisations APT avancées, un utilisateur non-root et un durcissement du système pour une compatibilité maximale.

Architectures supportées : amd64 et arm64


Points forts

  • Image "FROM scratch" : taille minimale, construite depuis le rootfs officiel Ubuntu OCI
  • Publication multi-arch (amd64, arm64) sous un manifeste unique
  • Optimisation APT & dpkg : aucun paquet recommandé, cache propre
  • Blocage des services automatiques (systemd, upstart)
  • Utilisateur non-root (appuser) pour une exécution plus sûre
  • Nettoyage complet : /tmp, /var/log, /var/lib/apt/lists
  • Locale & fuseau horaire configurés (en_US.UTF-8, UTC)
  • Durcissement système :
    • compte root verrouillé
    • suppression des bits SUID/SGID inutiles
    • umask 027 par défaut
  • Variables PUID/PGID pour l'UID/GID de l'utilisateur non-root
  • Reconstructions mensuelles automatiques, avec lint hadolint
  • Scans de vulnérabilités Trivy (rapports SARIF + JSON)

Paquets inclus

CatégoriePaquets
Base systèmebash, cron, curl, gnupg, jq, netcat-openbsd, tzdata
Outils systèmeapt-utils, ca-certificates, locales

Variables d'environnement

VariableValeur par défautDescription
PUID1000Identifiant de l'utilisateur non-root
PGID1000Identifiant de groupe non-root
HOME/configRépertoire personnel de appuser
LANGen_US.UTF-8Locale par défaut
TZUTCFuseau horaire
DEBIAN_FRONTENDnoninteractiveEmpêche les invites APT interactives

Spécifications de base

ChampValeur
SystèmeUbuntu 22.04 (Jammy)
Architecturesamd64, arm64
SourceUbuntu OCI RootFS
MainteneurSam Tech Lab
LicenceMIT
Mise à jourMensuelle (automatisée)

Tags disponibles

RegistreTagArchitecture
Docker Hubsamtechrepo/ubuntu-22.04-jammy:latestamd64 + arm64
Docker Hubsamtechrepo/ubuntu-22.04-jammy:YYYY.MMamd64 + arm64
GHCRghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:latestamd64 + arm64
GHCRghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:YYYY.MMamd64 + arm64

Ces tags pointent vers un manifeste multi-architecture : Docker sélectionne automatiquement l'image correspondant à la plateforme locale.


Source du Dockerfile

Pour les détails de sécurité et la politique de signalement, consultez SECURITY.md.

Envie de contribuer ? Consultez CONTRIBUTING.md et le CODE_OF_CONDUCT.md.


Exemple d'utilisation

1. Lancer un conteneur interactif
docker run -it --rm samtechrepo/ubuntu-22.04-jammy:latest /bin/bash
2. Dockerfile simple
FROM samtechrepo/ubuntu-22.04-jammy:latest

# L'image de base tourne en non-root (`USER appuser`) par défaut : l'installation
# de paquets doit donc se faire en root pendant le build, puis repasser en appuser.
USER root
RUN apt-get update && \
    apt-get install -y --no-install-recommends nginx && \
    rm -rf /var/lib/apt/lists/* && \
    sed -i 's/80 default_server;/8080 default_server;/g' /etc/nginx/sites-enabled/default && \
    sed -i '/^user /d' /etc/nginx/nginx.conf && \
    sed -i 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#' /etc/nginx/nginx.conf && \
    ln -sf /dev/stdout /var/log/nginx/access.log && \
    ln -sf /dev/stderr /var/log/nginx/error.log && \
    chown -R appuser:appuser /var/lib/nginx
USER appuser

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

Ce Dockerfile crée une image personnalisée basée sur ghcr.io/sam-tech-lab-git/ubuntu-22.04-jammy:latest, avec NGINX préinstallé. NGINX écoute sur le port 8080 plutôt que le port 80 par défaut, car se lier à un port privilégié (< 1024) nécessite les droits root, que ce conteneur n'a volontairement pas.

Vous pouvez ensuite la construire et la tester localement :

docker build -t my-nginx .

docker run -d -p 8080:8080 my-nginx

⚠️ N'installez pas de paquets au démarrage du conteneur (par exemple via un command: lançant apt-get install) - l'image tournant en utilisateur non-root par défaut, apt-get échouera avec Permission denied sur /var/lib/apt/lists. Installez toujours les paquets au moment du build, dans votre propre Dockerfile, comme montré ci-dessus.

3. Exemple avec Docker Compose

Utilisez le Dockerfile personnalisé de l'exemple précédent comme contexte de build. Créez un fichier nommé docker-compose.yml à côté :

services:
  web:
    build: .
    container_name: nginx-web
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      TZ: "Europe/Paris"

Puis lancer le conteneur :

docker compose up -d

Cela construit l'image NGINX personnalisée à partir de la base Sam Tech Lab, et démarre le serveur web sur http://localhost:8080.

Arrêter le conteneur :

docker compose down

License / Licence

This project is distributed under the MIT license - see the LICENSE file for more details.

Ce projet est distribué sous la licence MIT - consultez le fichier LICENSE pour plus de détails.


Copyright (c) 2026 Sam Tech Lab

Tag summary

Content type

Image

Digest

sha256:1a3ea31c4

Size

42.3 MB

Last updated

about 2 months ago

docker pull samtechrepo/ubuntu-22.04-jammy