Merged docker files
This commit is contained in:
17
Dockerfile
17
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
|
FROM node:21.7.3-alpine3.18
|
||||||
|
|
||||||
COPY --from=cache /cache/node_modules /app/node_modules
|
|
||||||
COPY . /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
COPY --from=cache /cache/node_modules /app/node_modules
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN apk add --no-cache ffmpeg
|
RUN apk add --no-cache ffmpeg
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user