diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..ce3a2137 Binary files /dev/null and b/.DS_Store differ diff --git a/Dockerfile b/Dockerfile index f709ee64..219a0737 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Start your image with a node base image -FROM node:18-alpine +FROM node:22-alpine AS builder # The /app directory should act as the main application directory WORKDIR /app @@ -13,11 +13,8 @@ COPY ./public ./public # Install node packages, install serve, build the app, and remove dependencies at the end RUN npm install \ - && npm install -g serve \ - && npm run build \ - && rm -fr node_modules + && npm run build -EXPOSE 3000 - -# Start the app using serve command -CMD [ "serve", "-s", "build" ] \ No newline at end of file +# Use a slim nginx image to reduce our image size drastically +FROM nginx:alpine-slim +COPY --from=builder /app/build /usr/share/nginx/html