2021-05-22 22:24:28 +08:00
|
|
|
FROM node:16-alpine3.13 as build-web
|
|
|
|
|
2021-05-23 15:36:41 +08:00
|
|
|
ARG NODE_ENV=production
|
|
|
|
|
2021-05-22 22:24:28 +08:00
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
RUN cd web && npm install
|
|
|
|
RUN cd web && npm run build
|
|
|
|
|
|
|
|
FROM golang:1.16-alpine3.13 as build
|
|
|
|
|
|
|
|
ARG CGO_ENABLED=0
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
COPY --from=build-web . .
|
2021-05-24 00:25:48 +08:00
|
|
|
RUN make TAGS=production
|
2021-05-22 22:24:28 +08:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
COPY --from=build upl /upl
|
|
|
|
|
|
|
|
RUN ["/upl"]
|