maubot/Dockerfile

21 lines
588 B
Docker
Raw Normal View History

2018-07-06 13:09:25 +00:00
FROM golang:1-alpine AS builder
RUN apk add --no-cache git ca-certificates
RUN wget -qO /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
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 13:44:21 +00:00
RUN CGO_ENABLED=0 go build -o /usr/bin/maubot maubot.xyz/cmd/maubot
2018-07-06 13:09:25 +00:00
FROM scratch
COPY --from=builder /usr/bin/maubot /usr/bin/maubot
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
2018-07-06 13:32:40 +00:00
CMD ["/usr/bin/maubot", "-c", "/etc/maubot/config.yaml"]