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 22:28:41 +00:00
|
|
|
ARG LEGO_VERSION=dev
|
2016-04-07 19:57:42 +00:00
|
|
|
|
2018-05-30 22:28:41 +00:00
|
|
|
WORKDIR /go/src/github.com/xenolf/lego
|
|
|
|
COPY . .
|
|
|
|
RUN go build -ldflags="-s -X main.version=${LEGO_VERSION}"
|
2018-05-30 12:01:23 +00:00
|
|
|
|
|
|
|
FROM alpine:3.7
|
|
|
|
RUN apk update && apk add --no-cache --virtual ca-certificates
|
2018-05-30 22:28:41 +00:00
|
|
|
COPY --from=builder /go/src/github.com/xenolf/lego/lego /usr/bin/lego
|
2016-04-07 19:57:42 +00:00
|
|
|
ENTRYPOINT [ "/usr/bin/lego" ]
|