feat: add .dockerignore and update Dockerfile for improved caching

This commit is contained in:
2025-08-05 22:40:17 +03:00
parent 573f50acc1
commit 1047a0b5fe
2 changed files with 23 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM node:18-alpine AS base
FROM node:lts-alpine AS base
# Install dependencies only when needed
FROM base AS deps
@ -10,7 +10,7 @@ RUN corepack enable
COPY .yarn ./.yarn
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .yarnrc.yml ./
RUN yarn --frozen-lockfile
RUN yarn && rm -rf .yarn/cache .yarn/unplugged .yarn/build-state.yml
# Rebuild the source code only when needed