2018-07-06 09:09:25 -04:00
|
|
|
FROM golang:1-alpine AS builder
|
|
|
|
|
2018-07-06 09:48:20 -04:00
|
|
|
RUN apk add --no-cache git ca-certificates gcc musl-dev
|
2018-09-19 18:49:39 -04:00
|
|
|
RUN wget -qO /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
|
2018-07-06 09:09:25 -04:00
|
|
|
RUN chmod +x /usr/local/bin/dep
|
|
|
|
|
|
|
|
COPY Gopkg.lock Gopkg.toml /go/src/maubot.xyz/
|
|
|
|
WORKDIR /go/src/maubot.xyz/
|
|
|
|
RUN dep ensure -vendor-only
|
|
|
|
|
|
|
|
COPY . /go/src/maubot.xyz/
|
2018-07-06 09:46:32 -04:00
|
|
|
RUN go build -o /usr/bin/maubot maubot.xyz/cmd/maubot
|
2018-07-06 09:09:25 -04:00
|
|
|
|
|
|
|
|
2018-07-06 09:46:32 -04:00
|
|
|
FROM alpine
|
2018-07-06 09:09:25 -04:00
|
|
|
|
2018-07-06 09:46:32 -04:00
|
|
|
RUN apk add --no-cache ca-certificates
|
2018-07-06 09:09:25 -04:00
|
|
|
COPY --from=builder /usr/bin/maubot /usr/bin/maubot
|
|
|
|
|
2018-07-06 09:32:40 -04:00
|
|
|
CMD ["/usr/bin/maubot", "-c", "/etc/maubot/config.yaml"]
|