From e39da51228953d56f922cb709315ae3f971c6b62 Mon Sep 17 00:00:00 2001 From: George Shramko Date: 2023年9月15日 21:21:35 -0700 Subject: [PATCH 1/4] Using node:18 image in dockerfile --- backend/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 2a27dd8..3bc4903 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,5 @@ -# Use the official Node.js LTS (Long-Term Support) image as the base image -FROM node:14 +# Use the official Node.js LTS (Long-Term Support) +FROM node:18 # Set the working directory inside the container WORKDIR /app @@ -19,7 +19,7 @@ COPY . . RUN npm run build # Expose the port your Node.js application is listening on -EXPOSE 3000 +EXPOSE 8080 # Define the command to start your Node.js application CMD ["node", "dist/server.js"] From e73d592d9451f664d701f6055adaa07811d1f9c4 Mon Sep 17 00:00:00 2001 From: George Shramko Date: 2023年9月15日 21:34:07 -0700 Subject: [PATCH 2/4] patching Dockerfile --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 3bc4903..356a094 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app COPY package*.json ./ # Install dependencies -RUN npm install --production \ +RUN npm install \ && npm install typescript -g From a3abc33f95295fd61aae34b6d865d86129ca7af7 Mon Sep 17 00:00:00 2001 From: George Shramko Date: 2023年9月16日 00:23:45 -0700 Subject: [PATCH 3/4] Lightweight node image, changing workdir --- backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 356a094..1cb451c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,8 +1,8 @@ # Use the official Node.js LTS (Long-Term Support) -FROM node:18 +FROM node:18-slim # Set the working directory inside the container -WORKDIR /app +WORKDIR /usr/src/app # Copy package.json and package-lock.json to the working directory COPY package*.json ./ From 34e472a231eadb1f419871edff0c5217d044897d Mon Sep 17 00:00:00 2001 From: George Shramko Date: 2023年9月16日 00:47:48 -0700 Subject: [PATCH 4/4] Use amd64 platform --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 1cb451c..697935d 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,5 @@ # Use the official Node.js LTS (Long-Term Support) -FROM node:18-slim +FROM --platform=linux/amd64 node:18-slim # Set the working directory inside the container WORKDIR /usr/src/app

AltStyle によって変換されたページ (->オリジナル) /