diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2eac0dc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +.git +.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c462ff3..681c60a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,10 @@ -FROM node:20-alpine as base - -FROM base as builder +FROM node:20-alpine as builder WORKDIR /home/node/app COPY package*.json ./ - -COPY . . RUN npm install yarn -RUN yarn install +RUN yarn install && yarn cache clean --force && rm -rf /tmp/* +COPY . . # RUN yarn build # FROM base as runtime