# Docker Container Repository Specification ## Repository Overview **Repository:** casjaysdevdocker **Maintainer:** CasjaysDev **License:** WTFPL / MIT **Purpose:** Collection of containerized applications using standardized Alpine-based templates --- ## Repository Structure This repository contains multiple Docker container projects organised as subdirectories. Each project follows a consistent structure and naming convention. ### Directory Layout ``` casjaysdevdocker/ ├── ampache/ # Media streaming server ├── apprise/ # Notification service ├── aria2/ # Download manager ├── bind/ # DNS server ├── bun/ # JavaScript runtime ├── caddy/ # Web server ├── code/ # VS Code server ├── couchdb/ # NoSQL database ├── ddns/ # Dynamic DNS client ├── deno/ # JavaScript runtime ├── docker/ # Docker-in-Docker ├── enclosed/ # Encrypted note sharing ├── forgejo/ # Git forge ├── gitea/ # Git service ├── gotify/ # Push notification server ├── i2pd/ # I2P router ├── icecast/ # Audio streaming ├── ifconfig/ # IP info service ├── jekyll/ # Static site generator ├── lighttpd/ # Web server ├── mailman/ # Mailing list manager ├── mariadb/ # SQL database ├── mongodb/ # NoSQL database ├── mpd/ # Music player daemon ├── mysql/ # SQL database ├── navidrome/ # Music streaming ├── neovim/ # Text editor ├── nextcloud/ # Cloud storage ├── nginx/ # Web server ├── nodejs/ # Node.js runtime ├── ntfy/ # Notification service ├── ollama/ # LLM runtime ├── opencloud/ # Cloud platform ├── opengist/ # Gist clone ├── pastebin/ # Pastebin service ├── php/ # PHP runtime ├── podman/ # Container runtime ├── postfix/ # Mail server ├── postgres/ # SQL database ├── proftpd/ # FTP server ├── python/ # Python runtime ├── redis/ # In-memory database ├── soft-serve/ # Git server ├── sqlite/ # SQL database ├── ssl-ca/ # SSL certificate authority ├── tftpd/ # TFTP server ├── tor/ # Tor relay ├── traefik/ # Reverse proxy ├── transmission/ # BitTorrent client ├── valkey/ # Redis fork ├── vim/ # Text editor ├── webmin/ # Web admin interface ├── wordpress/ # CMS platform ├── wttr/ # Weather service ├── xfce4/ # Desktop environment ├── ympd/ # MPD web client ├── youtube-dl/ # Video downloader └── tools/ # Shared tools & scripts ``` --- ## Standard Project Structure Each project directory contains: ``` project-name/ ├── .dockerignore # [generated] Docker build exclusions ├── .env.scripts # [generated] Environment variables for gen-dockerfile ├── .git/ # Git repository ├── .gitattributes # [generated] Git attributes ├── .gitea/workflows/ │ ├── docker.yaml # [hand-crafted] Legacy CI workflow — do not overwrite │ └── build.yml # [generated] by gen-dockerfile actions — regenerate freely ├── .gitignore # [generated] Git ignore patterns ├── Dockerfile # [generated] Container build definition ├── LICENSE.md # License information ├── README.md # [generated] Project documentation └── rootfs/ # Container filesystem overlay ├── root/docker/setup/ # [generated] Build-time setup scripts │ ├── 00-init.sh │ ├── 01-system.sh │ ├── 02-packages.sh │ ├── 03-files.sh │ ├── 04-users.sh │ ├── 05-custom.sh │ ├── 06-post.sh │ └── 07-cleanup.sh └── usr/local/ ├── bin/ │ ├── entrypoint.sh # [generated] Container entrypoint │ └── pkmgr # [generated] Package manager wrapper ├── etc/docker/ │ ├── functions/ │ │ └── entrypoint.sh # [generated] Entrypoint functions │ └── init.d/ # [hand-crafted] Runtime init scripts (one per service) └── share/template-files/ # [hand-crafted] Config/data templates ├── config/ ├── data/ └── defaults/ ``` **`[generated]`** — safe to overwrite with `gen-dockerfile --update`; changes will be lost on next regeneration. **`[hand-crafted]`** — must not be overwritten by gen-dockerfile; customised per container. --- ## gen-dockerfile Tool All containers are built using the **gen-dockerfile** tool. It generates standardised Dockerfiles, `.env.scripts`, workflow YAML, `pkmgr` scripts, and `rootfs/` scaffolding. ### Usage ```bash gen-dockerfile [options] [template] [Dockerfile] gen-dockerfile --dir ./myapp alpine gen-dockerfile --dir ./myapp --nginx --tag 1.25 gen-dockerfile --dir ./existing-project --update gen-dockerfile --dir ./myapp actions ``` ### Templates (positional argument or `--template`) | Template | Description | Pull source (build stage) | |----------|-------------|--------------------------| | `alpine` | Alpine Linux (default) | `alpine` (Docker Hub official) | | `arch` / `archlinux` | Arch Linux ARM | `menci/archlinuxarm` | | `debian` | Debian | `debian` | | `ubuntu` | Ubuntu | `ubuntu` | | `rhel` / `almalinux` / `rockylinux` / `centos` / `oraclelinux` / `redhat` | AlmaLinux/RHEL family | `almalinux` | | `web` | Adds `xorg` + `x11-apps` packages on top of the build stage; scratch final image | `casjaysdev/web` (exists) — override via `ENV_PULL_URL` | | `xorg` | Adds `xorg` + `x11-apps` packages on top of the build stage; scratch final image | `casjaysdev/xorg` (**does not exist**) — must set `ENV_PULL_URL` | | `scratch` | Scratch final image only (pair with any build template) | N/A | > **Note:** The pull source is the base image pulled for the **build stage**. All templates produce a `FROM scratch` final stage. For standard distros (`alpine`, `debian`, `ubuntu`, `rhel`, `arch`), the pull source is the official upstream image. For `web` and `xorg`, gen-dockerfile defaults to `casjaysdev/