From 6cda2c7d925ae6c7fc351880b0efbb51bcc586f2 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 29 Mar 2023 17:49:10 +0800 Subject: [PATCH] build: speed up front-end build --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ee481e..ab596bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ ARG ALPINE="alpine:3.17" +ARG NODE="node:14-alpine3.17" ARG RUST="rust:1.68-alpine3.17" ARG GOLANG="golang:1.19-alpine3.17" @@ -23,13 +24,12 @@ RUN apk add git ENV ADGUARD="0.107.26" RUN git clone https://github.com/AdguardTeam/AdGuardHome.git -b v${ADGUARD} --depth=1 -FROM ${ALPINE} AS adguard-web -RUN apk add make npm +FROM ${NODE} AS adguard-web +RUN apk add make COPY --from=adguard-src /AdGuardHome/ /AdGuardHome/ WORKDIR /AdGuardHome/ RUN make js-deps -# TODO: for node18, remove the OpenSSL compatibility option after AdGuardHome project upgrade -RUN env NODE_OPTIONS="--openssl-legacy-provider" make js-build +RUN make js-build RUN mv ./build/static/ /tmp/ FROM ${GOLANG} AS adguard