containers
Skill0 starsChanged 16 days agoMITView on GitHub
dreitagebart container conventions - use Containerfile instead of Dockerfile, compose.yml instead of docker-compose.yml, multi-stage builds, base images in the order Red Hat UBI (including AlmaLinux/Fedora), Alpine, slim, and always set restart unless-stopped and container_name. Use for Containerfiles, Compose files, images, deployment, container builds, Podman or Docker, database containers, and containerizing an app.
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- th3r-dev/th3-skillstheir own version, first seen Nov 29, 2026
- fmind/dotfilestheir own version, first seen Nov 29, 2026
- fmind/dottheir own version, first seen Nov 29, 2026
- filipe-campos/walphtheir own version, first seen Nov 15, 2026
- seayniclabs/homelab-infra-mcptheir own version, first seen Nov 8, 2026
- microsoft/azure-dev-toolstheir own version, first seen Oct 25, 2026
Used with
Projects with it also use sql.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
thechandanbhagatSkillsql
Write SQL queries, optimize database performance, design schemas, and debug SQL issues. Use for database operations, query optimization, and schema design.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- nimadorostkar/Claude-Skills-collection★ 41same name
- fmind/dot★ 14same name
- fmind/dotfiles★ 14same name
- microsoft/azure-dev-tools★ 11same name
- filipe-campos/walph★ 9same name
- zllovesuki/cloudflare-agent-skills★ 9same name
- th3r-dev/th3-skills★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- BrendenKennedy/claude-for-ai-platforms★ 1same name
- seayniclabs/homelab-infra-mcp★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- authSkill
- code-styleSkill
- databaseSkill
- data-fetchingSkill
- error-handlingSkill
- file-conventionsSkill
- formsSkill
- lint-and-testSkill
- monorepoSkill
- new-projectSkill
- react-componentsSkill
- runtime-and-languagesSkill
- setup-dreitagebart-skillsSkill
- stackSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Put .containerignore next to the Containerfile (Podman reads it, and Docker supports it for compatibility).
- Very specific: line 25
Package management in UBI/Alma: Always use microdnf instead of dnf in *-minimal images and clean caches in the same RUN layer (microdnf …
- Very specific: line 26
Do not guess tags: Check the tag in the registry (podman search, registry website) before adding it, then pin it exactly.
- Very specific: line 28
Keep secrets out of the image: do not copy .env or pass secrets as ARG.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Container
File names
Containerfile, nieDockerfile.compose.yml, neverdocker-compose.yml. Do not use the obsoleteversion:key.- Put
.containerignorenext to the Containerfile (Podman reads it, and Docker supports it for compatibility).
Building images
- Always use multiple stages: one for dependencies, one for building, and one lean runtime stage. Include only runtime artifacts in the runtime stage; exclude compilers and dev dependencies.
- Basisimage-Reihenfolge:
- Red Hat UBI (
registry.access.redhat.com/ubi9/..., orubi10/...if needed), provided no login is required and the image stays lean:- Runtime stages:
ubi9-micro(distroless, no package manager) orubi9-minimal(when packages must be installed withmicrodnf). - Language runtimes/build stages: official UBI images such as
ubi9/go-toolset,ubi9/python-312, orubi9/nodejs-20. - RPM ecosystem fallback: If a required package is missing from the free UBI repositories, use AlmaLinux (
almalinux:9-minimal) or Fedora (fedora-minimal).
- Runtime stages:
- Alpine (
*-alpine) when no suitable lean image exists in the Red Hat/RPM ecosystem. - slim variants (
*-slim) only when no Alpine image exists or Alpine (muslinstead ofglibc) demonstrably causes compatibility issues.
- Red Hat UBI (
- Bun has no official Red Hat image, so use
oven/bun:<Version>-alpine, or-slimas a fallback. - Package management in UBI/Alma: Always use
microdnfinstead ofdnfin*-minimalimages and clean caches in the sameRUNlayer (microdnf clean all). - Do not guess tags. Check the tag in the registry (
podman search, registry website) before adding it, then pin it exactly. Never use a floating tag such aslatest. - Do not run as root: UBI images already include the unprivileged default user
1001(USER 1001); theoven/bunimage usesUSER bun. For other images, create and set a non-root user explicitly. - Keep secrets out of the image: do not copy
.envor pass secrets asARG. Supply configuration at runtime through environment variables.
Templates: assets/Containerfile.bun-next (Next.js with Bun, standalone output) and assets/.containerignore.
The template requires output: 'standalone' in next.config.ts. With Prisma, run prisma generate in the build stage (see database). In a Turborepo, first create a lean workspace with turbo prune <app> --docker; adapt the template for each app.
Compose
For every service in compose.yml:
restart: unless-stopped- Set
container_name:to a unique name, suggested pattern<project>-<service>(for examplemyproject-web).
Weitere Regeln:
- Give databases (PostgreSQL) a named volume; do not bind-mount to unknown paths.
- Choose the database major version deliberately and pin it in the tag.
- Set
build.dockerfiletoContainerfile. - Supply credentials through
env_fileor secrets, never as plaintext in the Compose file.
The assets/compose.yml template is a placeholder; the user will provide the real Compose templates. Until then, apply the rules above, but ask before making stack decisions (reverse proxy, networks, health checks).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

