diff --git a/Dockerfile b/Dockerfile index eb77bd5..072f95b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,20 @@ -FROM node-cache AS cache +FROM node:21.7.3-alpine3.18 AS cache + +WORKDIR /cache + +COPY .yarnrc.yml . +COPY package.json . +COPY yarn.lock . + +RUN corepack enable +RUN yarn install + +# main image FROM node:21.7.3-alpine3.18 -COPY --from=cache /cache/node_modules /app/node_modules -COPY . /app WORKDIR /app +COPY --from=cache /cache/node_modules /app/node_modules +COPY . . RUN apk add --no-cache ffmpeg RUN corepack enable diff --git a/Dockerfile.cache b/Dockerfile.cache deleted file mode 100644 index f8df093..0000000 --- a/Dockerfile.cache +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:21.7.3-alpine3.18 - -RUN mkdir /cache - -COPY .yarnrc.yml /cache -COPY package.json /cache -COPY yarn.lock /cache - -WORKDIR /cache - -RUN corepack enable -RUN yarn install