mi-v1/Dockerfile

21 lines
437 B
Docker
Raw Normal View History

2020-01-18 13:13:33 +00:00
FROM xena/go:1.13.5 AS go
2020-01-11 21:06:44 +00:00
WORKDIR /mi
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN GOBIN=/mi/bin go install ./cmd/...
2020-01-18 13:13:33 +00:00
FROM xena/elm:0.19.1 AS elm
WORKDIR /mi
COPY ./frontend .
RUN elm make --output main.js src/Main.elm
2020-01-11 21:06:44 +00:00
FROM xena/alpine
2020-01-18 13:13:33 +00:00
COPY --from=go /mi/bin /usr/local/bin
2020-01-11 21:06:44 +00:00
COPY ./run /run
2020-01-18 13:13:33 +00:00
COPY --from=go /mi/static /mi/static
COPY --from=elm /mi/main.js /mi/static/main.js
2020-01-12 19:05:49 +00:00
WORKDIR /mi
2020-01-11 21:06:44 +00:00
CMD ["/bin/sh", "/run/start.sh"]