build: update dockerfile for using cache to speed up (#1372)

This commit is contained in:
远浅 2023-03-18 10:36:53 +08:00 committed by GitHub
parent c04a31dcda
commit 70e32637b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,13 @@
FROM node:18.12.1-alpine3.16 AS frontend
WORKDIR /frontend-build
COPY ./web/package.json ./web/yarn.lock ./
RUN yarn
COPY ./web/ .
RUN yarn && yarn build
RUN yarn build
# Build backend exec file.
FROM golang:1.19.3-alpine3.16 AS backend