Skip to content
Open
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
15 changes: 14 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Stage 1:

# Use the official Node.js 14 image as a base image
FROM node:14
FROM node:14 AS frontend

# Set the working directory in the container
WORKDIR /usr/src/app
Expand All @@ -13,5 +15,16 @@ RUN npm install
# Copy the rest of the application code to the container
COPY . .

# Stage 2:

# Smaller NodeJS base image
FROM node:14-alpine

# Set Working Directory for the container
WORKDIR /usr/src/app

# Copy dependencies from Stage 1
COPY --from=frontend /usr/src/app /usr/src/app

# Specify the command to run when the container starts
CMD [ "npm", "start" ]