Docker Concepts
Runtime dependencies
Files and interfaces needed when an application runs, including dynamic loaders, libraries and data. Verify the native architecture and runtime requirements; a smaller image is not inherently safe. Verify ELF architecture, interpreter and shared-library requirements separately.
Formal Syntax & Structure
docker syntaxdocker
Runtime dependenciesWorking Example
Example Snippetdocker
FROM golang:1.26 AS compileWORKDIR /srcCOPY main.go .RUN mkdir /out && CGO_ENABLED=0 GO111MODULE=off go build -trimpath -o /out/greeting main.goFROM scratchCOPY --from=compile /out/greeting /greetingCMD ["/greeting"]