2020-03-01 20:01:41 +00:00
|
|
|
FROM golang:1-alpine as builder
|
2016-04-07 19:57:42 +00:00
|
|
|
|
2019-07-30 19:19:32 +00:00
|
|
|
RUN apk --no-cache --no-progress add make git
|
2016-04-07 19:57:42 +00:00
|
|
|
|
2020-03-01 20:01:41 +00:00
|
|
|
WORKDIR /go/lego
|
|
|
|
|
|
|
|
ENV GO111MODULE on
|
|
|
|
|
|
|
|
# Download go modules
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
|
2018-05-30 22:28:41 +00:00
|
|
|
COPY . .
|
2018-11-05 16:54:38 +00:00
|
|
|
RUN make build
|
2018-05-30 12:01:23 +00:00
|
|
|
|
2023-02-26 13:27:16 +00:00
|
|
|
FROM alpine:3
|
2019-04-18 17:44:44 +00:00
|
|
|
RUN apk update \
|
|
|
|
&& apk add --no-cache ca-certificates tzdata \
|
|
|
|
&& update-ca-certificates
|
|
|
|
|
2020-03-01 20:01:41 +00:00
|
|
|
COPY --from=builder /go/lego/dist/lego /usr/bin/lego
|
|
|
|
|
2016-04-07 19:57:42 +00:00
|
|
|
ENTRYPOINT [ "/usr/bin/lego" ]
|