Files
portfolio/Dockerfile
Taqi Tahmid 5c9d8de03d
All checks were successful
Build the portfolio website / build-and-release-image (push) Has been skipped
Build the portfolio website / build-portfolio-website (push) Successful in 1m0s
updated dockerfile to use slip docker image
- updated dockerfile
- updated readme regarding image upload
2025-06-22 09:58:59 +03:00

31 lines
649 B
Docker

# Step 1: Build the React app
FROM node:24-slim AS build
WORKDIR /app
# Copy package.json and package-lock.json to the WORKDIR
COPY frontend/package.json ./
COPY frontend/package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the frontend files to the WORKDIR
COPY frontend/. ./
# Build the React app
RUN npm run build
# Step 2: Serve the app
FROM nginx:alpine
# Copy the built files from the build stage to the Nginx web root
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80
EXPOSE 80
# Run Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]