mi-v1/Dockerfile

22 lines
577 B
Docker
Raw Normal View History

2020-01-11 21:06:44 +00:00
FROM xena/go:1.13.5 AS build
WORKDIR /mi
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN GOBIN=/mi/bin go install ./cmd/...
2020-01-12 19:05:49 +00:00
RUN apk --no-cache add curl \
&& curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
&& gunzip elm.gz \
&& chmod +x ./elm \
&& mv elm /usr/local/bin \
&& cd ./frontend \
&& elm make --output ../static/main.js src/Main.elm
2020-01-11 21:06:44 +00:00
FROM xena/alpine
COPY --from=build /mi/bin /usr/local/bin
COPY ./run /run
2020-01-12 19:05:49 +00:00
COPY --from=build /mi/static /mi/static
WORKDIR /mi
2020-01-11 21:06:44 +00:00
CMD ["/bin/sh", "/run/start.sh"]