Skip to content

Commit

Permalink
Merge pull request #51 from bkochendorfer/dockerfile
Browse files Browse the repository at this point in the history
Create Dockerfile
  • Loading branch information
chris-wood authored Jul 25, 2023
2 parents d6fe342 + abad040 commit dc321df
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM golang:1.20-bookworm as build

WORKDIR /app

COPY go.* ./
RUN go mod download

COPY . ./

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags='-w -s -extldflags "-static"' -a \
-o /privacy-gateway-server

FROM gcr.io/distroless/static

COPY --from=build /privacy-gateway-server /privacy-gateway-server

EXPOSE 8080

CMD ["/privacy-gateway-server"]

0 comments on commit dc321df

Please sign in to comment.