FROM golang:1.23-alpine AS build
WORKDIR /src
COPY go.mod ./
COPY cmd/ ./cmd/
RUN go build -ldflags="-s -w" -o /out/bridge ./cmd/bridge
FROM alpine:3.20
RUN apk add --no-cache ca-certificates && adduser -D -u 65532 app
COPY --from=build /out/bridge /bridge
USER 65532:65532
EXPOSE 8080
ENTRYPOINT ["/bridge"]
