Switched to node

This commit is contained in:
2022-03-06 20:13:57 +07:00
parent 0c58565b61
commit a708d8589f
2 changed files with 4 additions and 14 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
npm-debug.log

View File

@@ -1,26 +1,14 @@
FROM debian AS build FROM node:17 AS build
WORKDIR /home/node/app WORKDIR /home/node/app
COPY . . COPY . .
RUN apt-get update -y
RUN apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get -y install nodejs
RUN npm i -g yarn
RUN yarn RUN yarn
RUN yarn build RUN yarn build
FROM debian FROM node:17
WORKDIR /home/node/app WORKDIR /home/node/app
RUN apt-get update -y
RUN apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get -y install nodejs
RUN npm i -g yarn
COPY --from=build /home/node/app/package.json . COPY --from=build /home/node/app/package.json .
COPY --from=build /home/node/app/yarn.lock . COPY --from=build /home/node/app/yarn.lock .