Container-Plattform für reproduzierbare Build-/Deploy-Pipelines.
Docker containerisiert Anwendungen — reproduzierbare Builds, isolierte Runtimes, identische Umgebungen von Dev bis Prod. Standard für Deploy-Pipelines (auch hier: Frontend baut auf Coolify via frontend/Dockerfile).
brew install --cask docker
docker --version
docker run hello-world
Minimaler Next.js-Dockerfile:
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
FROM deps AS build
COPY . .
RUN pnpm build
FROM node:20-alpine AS run
COPY --from=build /app/.next/standalone ./
CMD ["node", "server.js"]
.dockerignore mit node_modules, .next, .git — Build-Context klein halten.package.json kopieren + install, dann Source — Re-Build nur bei Dep-Änderung.docker compose für lokale Multi-Service-Stacks (Supabase self-hosted nutzt das).USER node für Security.COPY . . ohne .dockerignore → ganzes Repo (inkl. node_modules, .git) im Build-Context, schlechte Performance.--platform=linux/amd64 setzen.ENV landen im Image — --secret-Mount nutzen oder Build-Args, die nicht in Final-Layer landen.latest-Tag in Production = Roulette. Konkrete Versions-Tags / Digests.Statische Sites ohne Backend → Edge-Hosting (Vercel/Cloudflare Pages) ohne Docker-Overhead. Native-Apps offensichtlich nicht.
Referenzen(1)