feat: cache proxy
This commit is contained in:
parent
4584932e4f
commit
372b58d1fe
10 changed files with 1176 additions and 0 deletions
21
proxy/Dockerfile
Normal file
21
proxy/Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# this is our first build stage, it will not persist in the final image
|
||||
FROM node:20.11.0-buster-slim as intermediate
|
||||
|
||||
# installation required packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ssh git python python3 build-essential
|
||||
RUN npm install -g pnpm@9.1.1
|
||||
RUN mkdir -p /opt
|
||||
WORKDIR /opt
|
||||
|
||||
COPY tsconfig.json /opt
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
COPY ./src /opt/src
|
||||
|
||||
RUN pnpm run build
|
||||
|
||||
# copy just the package form the previous image
|
||||
FROM node:20.11.0-buster-slim
|
||||
COPY --from=intermediate /opt /opt
|
||||
ENTRYPOINT ["node", "/opt/build/index.js"]
|
Loading…
Add table
Add a link
Reference in a new issue