Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# kept so Dependabot preserves the -alpine variant on bumps: given a digest alone
# it cannot tell -alpine from the default Debian image and silently flips the
# builder to Debian, which has no `apk` and breaks the build.
FROM golang:1.27-alpine@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder
FROM golang:1.27-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder

# Install build dependencies
RUN apk add --no-cache git ca-certificates tzdata
Expand All @@ -33,7 +33,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build \
# =============================================================================
# Runtime stage
# =============================================================================
FROM alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
FROM alpine:3.24@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

RUN apk add --no-cache ca-certificates tzdata curl postgresql-client \
&& adduser -D -H -u 1000 app
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# reproducibility; the tag is kept so Dependabot preserves the -alpine variant on
# bumps (a digest alone is variant-ambiguous and can flip the builder to Debian,
# which has no `apk`).
FROM golang:1.27-alpine@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder
FROM golang:1.27-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder

RUN apk add --no-cache ca-certificates git tzdata

Expand All @@ -32,7 +32,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build \
# =============================================================================
# Runtime stage
# =============================================================================
FROM alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
FROM alpine:3.24@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

RUN apk add --no-cache ca-certificates curl postgresql-client tzdata \
&& adduser -D -H -u 1000 app
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.pos
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
FROM golang:1.27.3-bookworm@sha256:21ade014faf952365b9ecbd8dbdb87176fbacb82fac9fb132d9f2a7b8cc3f132 AS builder
FROM golang:1.27.3-bookworm@sha256:972b4110ba0f47539a975c31e52c64765e1ff19f2d74469ae4a595c6676e80a5 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/merchant-pos ./cmd/pos

FROM alpine@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
FROM alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a
RUN apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata && addgroup -g 1000 pos && adduser -D -u 1000 -G pos pos && mkdir -p /app/data && chown pos:pos /app/data
WORKDIR /app
COPY --from=builder /out/merchant-pos /app/merchant-pos
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.throughput
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# reproducibility; the tag is kept so Dependabot preserves the -alpine variant on
# bumps (a digest alone is variant-ambiguous and can flip the builder to Debian,
# which has no `apk`).
FROM golang:1.27-alpine@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder
FROM golang:1.27-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder

RUN apk add --no-cache ca-certificates git tzdata

Expand All @@ -34,7 +34,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build \
# =============================================================================
# Runtime stage
# =============================================================================
FROM alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
FROM alpine:3.24@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

RUN apk add --no-cache ca-certificates curl postgresql-client tzdata \
&& adduser -D -H -u 1000 app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# platform and stay reproducible; the tag is kept so Dependabot preserves the
# -alpine variant on bumps (a digest alone is variant-ambiguous and can flip the
# builder to Debian, which has no `apk`).
FROM golang:1.27-alpine@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder
FROM golang:1.27-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder

# Install git, ca-certificates, and SQLite development libraries
RUN apk add --no-cache git ca-certificates sqlite-dev gcc musl-dev
Expand All @@ -31,7 +31,7 @@ RUN go mod tidy
RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o faucet-server ./cmd/main.go

# Final stage
FROM alpine:3.24@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
FROM alpine:3.24@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a

# Install ca-certificates for HTTPS requests
RUN apk --no-cache add ca-certificates
Expand Down
Loading