2018-05-30 12:01:23 +00:00
|
|
|
FROM golang:alpine3.7 as builder
|
2016-04-07 19:57:42 +00:00
|
|
|
|
2018-05-30 12:01:23 +00:00
|
|
|
ARG LEGO_VERSION=master
|
2016-04-07 19:57:42 +00:00
|
|
|
|
2018-05-30 12:01:23 +00:00
|
|
|
RUN apk update && \
|
|
|
|
apk add --no-cache --virtual git && \
|
2016-04-19 08:13:22 +00:00
|
|
|
go get -u github.com/xenolf/lego && \
|
2017-09-26 19:57:02 +00:00
|
|
|
cd ${GOPATH}/src/github.com/xenolf/lego && \
|
|
|
|
git checkout ${LEGO_VERSION} && \
|
2018-05-30 12:01:23 +00:00
|
|
|
go build -o /usr/bin/lego .
|
|
|
|
|
|
|
|
FROM alpine:3.7
|
|
|
|
RUN apk update && apk add --no-cache --virtual ca-certificates
|
|
|
|
COPY --from=builder /usr/bin/lego /usr/bin/lego
|
2016-04-07 19:57:42 +00:00
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/bin/lego" ]
|