menu_book Course Curriculum (CI/CD & DevOps Pipelines) expand_more
Pipeline Foundations
Triggers, Change Detection & Concurrency
Build, Test & Quality Gates
Artifacts, Containers & Supply Chain
Secrets, Identity & Environment Controls
Deployment Strategies & Database Safety
Pipeline Engines & Reuse
Container image build
Learn Container image build through a production-oriented CI/CD example, operational guidance, and a mastery check.
12 min read
•
Intermediate
Advertisement
Dockerfile.ci
dockerfile
FROM golang:1.25-alpine AS compile
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /out/server ./cmd/server
FROM gcr.io/distroless/static-debian12
COPY --from=compile /out/server /server
ENTRYPOINT ["/server"]
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content