Skip to content

Commit

Permalink
perf: update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Aug 1, 2024
1 parent eab1177 commit 769b6dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}'" \
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile-ee
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 769b6dc

Please sign in to comment.