feat: add .dockerignore and update Dockerfile for improved caching
This commit is contained in:
21
.dockerignore
Normal file
21
.dockerignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
.storybook
|
||||||
|
tests
|
||||||
|
__tests__
|
||||||
|
*.spec.ts
|
||||||
|
*.test.ts
|
||||||
|
node_modules
|
||||||
|
.yarn/cache
|
||||||
|
.eslint
|
||||||
|
.prettier
|
||||||
|
.stylelint
|
||||||
|
.env
|
||||||
|
.idea
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
README.md
|
||||||
|
*.log
|
||||||
|
test
|
||||||
|
docs
|
||||||
|
coverage
|
||||||
|
*.map
|
||||||
@ -1,4 +1,4 @@
|
|||||||
FROM node:18-alpine AS base
|
FROM node:lts-alpine AS base
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
@ -10,7 +10,7 @@ RUN corepack enable
|
|||||||
COPY .yarn ./.yarn
|
COPY .yarn ./.yarn
|
||||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .yarnrc.yml ./
|
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
|
# Rebuild the source code only when needed
|
||||||
|
|||||||
Reference in New Issue
Block a user