2019-04-08 10:16:59 +00:00
|
|
|
FROM golang:1.12.2-alpine as builder
|
2019-04-08 05:43:13 +00:00
|
|
|
RUN mkdir /notify.moe
|
|
|
|
ADD . /notify.moe
|
|
|
|
WORKDIR /notify.moe
|
|
|
|
ENV ARN_ROOT /notify.moe
|
2019-04-08 10:16:59 +00:00
|
|
|
RUN apk add git nodejs npm make gcc libc-dev
|
2019-04-08 05:43:13 +00:00
|
|
|
RUN npm i -g typescript
|
|
|
|
RUN go mod download
|
2019-04-08 07:55:45 +00:00
|
|
|
RUN make tools && make assets
|
2019-04-08 10:16:59 +00:00
|
|
|
RUN GOOS=linux go build
|
2019-04-08 07:55:45 +00:00
|
|
|
RUN git clone --depth=1 https://github.com/animenotifier/database ~/.aero/db/arn
|
2019-04-08 10:16:59 +00:00
|
|
|
|
|
|
|
FROM alpine:latest as production
|
|
|
|
COPY --from=builder /root/.aero /root/.aero
|
|
|
|
COPY --from=builder /notify.moe /notify.moe
|
|
|
|
WORKDIR /notify.moe
|
|
|
|
CMD ["./notify.moe"]
|