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/... 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 FROM xena/alpine COPY --from=build /mi/bin /usr/local/bin COPY ./run /run COPY --from=build /mi/static /mi/static WORKDIR /mi CMD ["/bin/sh", "/run/start.sh"]