samtechrepo/focal

By samtechrepo

Updated 6 months ago

Image Ubuntu ultra-légère, sécurisée et optimisée pour la production – Sam Tech Lab

Image
Security
Operating systems
0

1.0K

samtechrepo/focal repository overview

Docker Pulls Docker Stars GitHub License: MIT Build amd64 — Monthly Build arm64 — Monthly Build multiarch — Monthly


Overview

This image provides a clean, stable, and minimal Ubuntu 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.


Key Features

  • “FROM scratch” image — minimal size with optimized multi-stage builds
  • Based on the official Ubuntu OCI rootfs
  • 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 easy permission mapping
  • Automated monthly rebuilds
  • Regular security patches

Included Packages

CategoryPackages
System basebash, cron, curl, gnupg, jq, netcat-openbsd, tzdata
System toolssystemd-standalone-sysusers, apt-utils, locales

Environment Variables

VariableDefault valueDescription
PUID999Non-root user ID
PGID999Non-root group ID
HOME/configHome directory
LANGen_US.UTF-8Default locale
TZUTCTimezone
DEBIAN_FRONTENDnoninteractiveDisables interactive APT prompts

Base Specifications

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

Dockerfile Sources


Usage Examples

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

RUN apt update && apt install -y nginx

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

This Dockerfile creates a custom image based on samtechrepo/focal:latest with NGINX preinstalled.

You can then build and test it locally:

docker build -t my-nginx .

docker run -d -p 8080:80 my-nginx
3. Example with Docker Compose

Create a file named docker-compose.yml:

services:
  web:
    image: samtechrepo/focal:latest
    container_name: nginx-web
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./html:/var/www/html
    environment:
      TZ: "Europe/Paris"
      PUID: 1000
      PGID: 1000
    command: >
      bash -c "
      apt update &&
      apt install -y nginx &&
      nginx -g 'daemon off;'
      "

Then start the container :

docker compose up -d

This automatically pulls the optimized Ubuntu image from Sam Tech Lab, installs NGINX, and launches the web server at http://localhost:8080.

To stop the container :

docker compose down

Présentation

Cette image fournit une base Ubuntu 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.


Points forts

  • Image ”FROM scratch” : taille minimale, multi-étapes optimisées
  • Basée sur le rootfs officiel Ubuntu OCI
  • 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 mapper facilement les permissions
  • Mises à jour système automatiques chaque mois
  • Correctifs de sécurité réguliers

Paquets inclus

CatégoriePaquets
Base systèmebash, cron, curl, gnupg, jq, netcat-openbsd, tzdata
Outils systèmesystemd-standalone-sysusers, apt-utils, locales

Variables d’environnement

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

Spécifications de base

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

Sources du Dockerfile


Exemple d’utilisation

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

RUN apt update && apt install -y nginx

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

Ce Dockerfile crée une image personnalisée basée sur samtechrepo/focal:latest, avec NGINX préinstallé.

Vous pouvez ensuite la construire et la tester localement :

docker build -t my-nginx .

docker run -d -p 8080:80 my-nginx
3. Exemple avec Docker Compose

Créer un fichier nommé docker-compose.yml :

services:
  web:
    image: samtechrepo/focal:latest
    container_name: nginx-web
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./html:/var/www/html
    environment:
      TZ: "Europe/Paris"
      PUID: 1000
      PGID: 1000
    command: >
      bash -c "
      apt update &&
      apt install -y nginx &&
      nginx -g 'daemon off;'
      "

Puis lancer le conteneur :

docker compose up -d

Cela télécharge automatiquement l’image Ubuntu optimisée Sam Tech Lab, installe Nginx, 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) 2025 Sam Tech Lab

Tag summary

Content type

Image

Digest

sha256:67b41e4f9

Size

87 MB

Last updated

6 months ago

docker pull samtechrepo/focal:2026.02