From 7ed46b837dc47ae9a1f653e777659eab4f7fc77d Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 1 Aug 2024 15:19:58 +0800 Subject: [PATCH] perf: update Dockerfile --- Dockerfile | 6 ++---- Dockerfile-ee | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 72155df..65ee0bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,16 +9,14 @@ COPY . . WORKDIR /opt/lion/ui -RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=lion \ - yarn build +RUN yarn build WORKDIR /opt/lion/ ARG VERSION ENV VERSION=$VERSION -RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked,id=lion \ - export GOFlAGS="-X 'main.Buildstamp=`date -u '+%Y-%m-%d %I:%M:%S%p'`'" \ +RUN export GOFlAGS="-X 'main.Buildstamp=`date -u '+%Y-%m-%d %I:%M:%S%p'`'" \ && export GOFlAGS="${GOFlAGS} -X 'main.Githash=`git rev-parse HEAD`'" \ && export GOFlAGS="${GOFlAGS} -X 'main.Goversion=`go version`'" \ && export GOFlAGS="${GOFlAGS} -X 'main.Version=${VERSION}'" \ diff --git a/Dockerfile-ee b/Dockerfile-ee index f560b0e..ac76dc3 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -10,8 +10,6 @@ ARG DEPENDENCIES=" \ vim \ wget" -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=lion \ - --mount=type=cache,target=/var/lib/apt,sharing=locked,id=lion \ - set -ex \ +RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends ${DEPENDENCIES}