Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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" ]
# Use a slim nginx image to reduce our image size drastically
FROM nginx:alpine-slim
COPY --from=builder /app/build /usr/share/nginx/html