refine docker build

This commit is contained in:
Cadey Ratio 2020-01-18 18:37:07 +00:00
parent 11c751e6bc
commit e3052492b4
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM xena/go:1.13.5 AS go
FROM xena/go:1.13.6 AS go
WORKDIR /mi
COPY go.mod .
COPY go.sum .
@ -7,9 +7,12 @@ COPY . .
RUN GOBIN=/mi/bin go install ./cmd/...
FROM xena/elm:0.19.1 AS elm
RUN apk --no-cache add nodejs npm \
&& npm install -g elm-spa
WORKDIR /mi
COPY ./frontend .
RUN elm make --output main.js src/Main.elm --optimize
RUN elm-spa build . \
&& elm make --output main.js src/Main.elm --optimize
FROM xena/alpine
COPY --from=go /mi/bin /usr/local/bin