From a708d8589ff43442cc6289d90afe45b5357f6ed7 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sun, 6 Mar 2022 20:13:57 +0700 Subject: [PATCH] Switched to node --- .dockerignore | 2 ++ Dockerfile | 16 ++-------------- 2 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5171c54 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5e57956..3cf94d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,14 @@ -FROM debian AS build +FROM node:17 AS build WORKDIR /home/node/app 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 build -FROM debian +FROM node:17 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/yarn.lock .