-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dockerfile #49
base: main
Are you sure you want to change the base?
Conversation
1 |
1 |
Update Dockerfile
Update Dockerfile
Update Dockerfile
Stage 1: Build the React applicationFROM node:8.15.1-alpine as build-stage Set the working directory in the containerWORKDIR /usr/src/app Copy package.json and package-lock.jsonCOPY package*.json ./ Install dependenciesRUN npm --verbose install Copy the rest of the application codeCOPY . . Build the React applicationRUN npm run build Stage 2: Serve the React application using a lightweight web serverFROM nginx:alpine Copy the build artifacts from the build stage#COPY --from=build /app/build /usr/share/nginx/index.html Expose port 80 to access the applicationEXPOSE 80 Start NginxCMD ["nginx", "-g", "daemon off;"] |
you can use it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can change such as i say to you
No description provided.