18 lines
426 B
Docker
18 lines
426 B
Docker
|
FROM golang:1.13-alpine AS builder
|
||
|
ARG SVC
|
||
|
ARG GOARCH
|
||
|
ARG GOARM
|
||
|
|
||
|
WORKDIR /go/src/github.com/mainflux/license
|
||
|
COPY . .
|
||
|
RUN apk update \
|
||
|
&& apk add make\
|
||
|
&& make $SVC \
|
||
|
&& mv build/mainflux-license-$SVC /exe
|
||
|
|
||
|
FROM scratch
|
||
|
# Certificates are needed so that mailing util can work.
|
||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||
|
COPY --from=builder /exe /
|
||
|
ENTRYPOINT ["/exe"]
|