Merged docker files

This commit is contained in:
2024-09-25 01:38:18 +02:00
parent c7292bfe2c
commit d56111995e
2 changed files with 14 additions and 15 deletions

View File

@@ -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

View File

@@ -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