flagger Docker & Self-Hosted Deployment

GitHub

Progressive delivery Kubernetes operator (Canary, A/B Testing and Blue/Green deployments)

5,421 stars Go Go 1 file ยท ~83,226 tokens #ab-testing#aws-appmesh#canary#contour#gitops#gloo#istio#kubernetes
1. Pull Image (DOCKERHUB) docker pull fluxcd/flagger:latest
2. Docker Run (1-Click Launch) docker run -d --name flagger --restart always fluxcd/flagger:latest
3. Podman Run podman run -d --name flagger --restart always fluxcd/flagger:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/fluxcd/flagger:latest
5. ORAS Pull (OCI Artifact) oras pull fluxcd/flagger:latest
Dockerfile
ARG GO_VERSION=1.26
ARG XX_VERSION=1.6.1

FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

# copy build utilities
COPY --from=xx / /

ARG TARGETPLATFORM
ARG REVISON

WORKDIR /workspace

# copy modules manifests
COPY go.mod go.mod
COPY go.sum go.sum

# cache modules
RUN go mod download

# copy source code
COPY cmd/ cmd/
COPY pkg/ pkg/

# build
ENV CGO_ENABLED=0
RUN xx-go build \
    -ldflags "-s -w -X github.com/fluxcd/flagger/pkg/version.REVISION=${REVISON}" \
    -a -o flagger ./cmd/flagger

FROM alpine:3.22

RUN apk --no-cache add ca-certificates

USER nobody

COPY --from=builder --chown=nobody:nobody /workspace/flagger .

ENTRYPOINT ["./flagger"]