You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please share a proper dockerfile. When create a own dockerfile, it doesn't build, giving some package error. When I run my local machine, it work perfectly
The text was updated successfully, but these errors were encountered:
arn-ob
changed the title
🧐[问题 | Need a proper Dockerfile]
🧐[问题 | Need a Dockerfile]
Apr 8, 2024
# Use a Node.js base image
FROM node:16-alpine as builder
# Set the working directory in the container
WORKDIR /app
COPY . .
RUN npm install -g pnpm
# Copy package.json and package-lock.json to the container
COPY package*.json ./
# Install project dependencies
RUN pnpm install
# Build the production version of the project
RUN pnpm build
# Stage 2: Serve the built application using Nginx
FROM nginx:alpine
# Copy the built application from the builder stage to the nginx directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
Please share a proper dockerfile. When create a own dockerfile, it doesn't build, giving some package error. When I run my local machine, it work perfectly
The text was updated successfully, but these errors were encountered: