From a10b47eb7ec57d74bfbebebb0e37fc1607188f98 Mon Sep 17 00:00:00 2001 From: allburov Date: Sun, 21 Jan 2024 19:49:48 +0700 Subject: [PATCH] [core] Dockerfile - mount ssh in case of private repositories --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a889f935..221e049c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,16 +5,21 @@ FROM node:20-bullseye as build ENV PUPPETEER_SKIP_DOWNLOAD=True # npm packages +RUN apt-get update \ + && apt-get install -y openssh-client +RUN apt install openssh-client +RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts + WORKDIR /src COPY package.json . COPY yarn.lock . RUN yarn set version 3.6.3 -RUN yarn install +RUN --mount=type=ssh yarn install # App WORKDIR /src ADD . /src -RUN yarn install +RUN --mount=type=ssh yarn install RUN yarn build && find ./dist -name "*.d.ts" -delete #