1
0
Fork 0
upl/Dockerfile

26 lines
425 B
Docker
Raw Normal View History

2021-05-22 22:24:28 +08:00
FROM node:16-alpine3.13 as build-web
WORKDIR /src
COPY . .
RUN cd web && npm install
2021-05-24 01:12:47 +08:00
ARG NODE_ENV=production
2021-05-22 22:24:28 +08:00
RUN cd web && npm run build
FROM golang:1.16-alpine3.13 as build
2021-05-24 01:12:47 +08:00
RUN apk add \
make
2021-05-22 22:24:28 +08:00
WORKDIR /src
COPY --from=build-web . .
2021-05-24 01:12:47 +08:00
ARG CGO_ENABLED=0
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"]