|
|
@ -1,6 +1,7 @@
|
|
|
|
FROM node:14.14.0-alpine3.10 AS builder
|
|
|
|
FROM node:14.14.0-alpine3.10 AS builder
|
|
|
|
WORKDIR /
|
|
|
|
WORKDIR /
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
|
|
|
|
RUN apk add --no-cache python3
|
|
|
|
RUN npm install && npm install -g @angular/cli && mkdir frontend
|
|
|
|
RUN npm install && npm install -g @angular/cli && mkdir frontend
|
|
|
|
RUN mv node_modules ./frontend
|
|
|
|
RUN mv node_modules ./frontend
|
|
|
|
WORKDIR /frontend
|
|
|
|
WORKDIR /frontend
|
|
|
@ -12,7 +13,7 @@ FROM golang:1.13.4-alpine as builder2
|
|
|
|
ARG ARCH=amd64
|
|
|
|
ARG ARCH=amd64
|
|
|
|
RUN apk add git
|
|
|
|
RUN apk add git
|
|
|
|
WORKDIR /
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=builder /frontend/dist /dist
|
|
|
|
COPY --from=builder /frontend/dist /dist
|
|
|
|
RUN go get github.com/rakyll/statik
|
|
|
|
RUN go get github.com/rakyll/statik
|
|
|
|
RUN statik --src=/dist/flotte-frontend
|
|
|
|
RUN statik --src=/dist/flotte-frontend
|
|
|
|
COPY *.go *.sum *.mod /
|
|
|
|
COPY *.go *.sum *.mod /
|
|
|
|