FROM xena/go:1.13.5 AS go WORKDIR /mi COPY go.mod . COPY go.sum . RUN go mod download COPY . . RUN GOBIN=/mi/bin go install ./cmd/... FROM xena/elm:0.19.1 AS elm WORKDIR /mi COPY ./frontend . RUN elm make --output main.js src/Main.elm --optimize FROM xena/alpine COPY --from=go /mi/bin /usr/local/bin COPY ./run /run COPY --from=go /mi/static /mi/static COPY --from=elm /mi/main.js /mi/static/main.js WORKDIR /mi CMD ["/bin/sh", "/run/start.sh"]