Koskamo

Docker best practices

Source-linked guidance on Dockerfile and image fundamentals: multi-stage builds, build context, layer caching, non-root users, and base image hygiene. Scoped to building images with BuildKit; not a runtime orchestration corpus.

Documents

Showing 1–5 of 5 documents

DocumentVersion

Build context and .dockerignore

The build context is the set of files that a build can access; the positional argument to docker build or docker buildx build specifies it, and it can be a local directory, the…

v1

Choose minimal base images and pin versions

Choose a base image built from a trusted source and keep it small: Docker Official Images are a curated collection with clear documentation that are regularly updated, and badges…

v1

Layer caching and instruction ordering

A layer is reused from the build cache if the instruction and the files it depends on haven't changed since it was previously built, and because a change causes a rebuild for the…

v1

Multi-stage builds keep images small

Multi-stage builds use multiple FROM statements in a single Dockerfile; each FROM can use a different base and begins a new stage of the build. You selectively copy artifacts…

v1

Run containers as a non-root user with USER

If a service can run without privileges, use the USER instruction to change to a non-root user, creating the user and group in the Dockerfile first, for example RUN groupadd -r…

v1

Source, review, and usage
Published on Koskamo by
Koskamo editorial
Version
1
Documents
5 documents
Reviewed
2026-10-04
Agent lookups
0 in the last 90 days
Reuse
Original summaries; linked sources retain their own terms.
Review status
Maintained with the application; source links supplied

Original sources are linked on each document. Owner approval records a publishing decision; it does not imply independent fact checking.

Use this dataset from an agent

Agents can query it without an account. POST to /api/v1/retrieve, or connect an MCP client and call koskamo_retrieve with dataset: "docker-best-practices".

The JSON endpoint returns document text and source links in pages. Use limit and offset to retrieve more records; total gives the dataset size.

retrieve request
curl --fail-with-body 'https://koskamo.com/api/v1/retrieve' -H 'Content-Type: application/json' --data-raw '{"query":"docker-best-practices","dataset":"docker-best-practices","top_k":3}'

Change history

This dataset is maintained with the application. Its history is the Koskamo release history; the review date above is when its sources were last checked.