1
0
Fork 1
mirror of https://github.com/git-pkgs/proxy.git synced 2026-06-02 08:38:17 -04:00
pkg-proxy/Dockerfile
dependabot[bot] 7832db2adb
Bump golang from 1.25-alpine to 1.26.3-alpine (#138)
Bumps golang from 1.25-alpine to 1.26.3-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.3-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-22 03:46:59 +01:00

34 lines
577 B
Docker

FROM golang:1.26.3-alpine AS builder
WORKDIR /src
# Install build dependencies
RUN apk add --no-cache git
# Copy go mod files first for caching
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the binary
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /proxy ./cmd/proxy
FROM alpine:3.23.4
RUN apk add --no-cache ca-certificates
COPY --from=builder /proxy /usr/local/bin/proxy
# Create non-root user
RUN adduser -D -u 1000 proxy
USER proxy
# Default data directory
WORKDIR /data
EXPOSE 8080
ENTRYPOINT ["proxy"]
CMD ["serve"]