-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
17 lines (14 loc) · 584 Bytes
/
Dockerfile
File metadata and controls
17 lines (14 loc) · 584 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM golang:1.22 AS builder
ENV CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
GIT_TERMINAL_PROMPT=1
COPY ./main.go ./go.mod ./go.sum ${GOPATH}/src/github.com/kvendingoldo/aws-letsencrypt-lambda/
COPY ./internal ${GOPATH}/src/github.com/kvendingoldo/aws-letsencrypt-lambda/internal
WORKDIR ${GOPATH}/src/github.com/kvendingoldo/aws-letsencrypt-lambda
RUN go get ./
RUN go build -ldflags="-s -w" -o lambda .
FROM gcr.io/distroless/static:nonroot
COPY --from=builder go/src/github.com/kvendingoldo/aws-letsencrypt-lambda/lambda /app/
WORKDIR /app
ENTRYPOINT ["/app/lambda"]