From 70e32637b0c48e7adc381eec90e52d476a2e080f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9C=E6=B5=85?= <370732889@qq.com> Date: Sat, 18 Mar 2023 10:36:53 +0800 Subject: [PATCH] build: update dockerfile for using cache to speed up (#1372) --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 20ae4f56..d80c9313 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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