Skip to content

Commit

Permalink
Cache yarn install during docker builds to improve subsequent build s…
Browse files Browse the repository at this point in the history
…peeds
  • Loading branch information
hgw8 committed Dec 10, 2023
1 parent 36e43b3 commit 4c87370
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev &
USER node
WORKDIR /var/opt/hardlounge-src
ENV THELOUNGE_HOME /var/opt/hardlounge
COPY package.json yarn.lock .
RUN yarn install
COPY . .
#RUN git clone https://git.supernets.org/supernets/hardlounge.git --depth 1 .
RUN yarn install && \
NODE_ENV=production yarn build && \
RUN NODE_ENV=production yarn build && \
yarn link && \
yarn --non-interactive cache clean && \
ln -s /var/opt/hardlounge-src/index.js /var/opt/hardlounge-src/hardlounge
Expand Down

0 comments on commit 4c87370

Please sign in to comment.