1
0
Fork 1
mirror of https://github.com/git-pkgs/proxy.git synced 2026-07-06 06:13:20 -04:00
pkg-proxy/Dockerfile
dependabot[bot] 22c9df6374
Bump alpine from 3.24.0 to 3.24.1 (#172)
Bumps alpine from 3.24.0 to 3.24.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.24.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-18 16:57:21 +01:00

34 lines
577 B
Docker

FROM golang:1.26.4-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.24.1
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"]