Files
relay/client/Dockerfile
2024-11-16 18:01:16 +01:00

25 lines
458 B
Docker

FROM node:18 AS builder
WORKDIR /app/client
COPY . .
# Install dependencies
RUN npm install
# Build the project
RUN npm run build
FROM nginx:alpine
# Remove the default Nginx configuration file
RUN rm /etc/nginx/conf.d/default.conf
# Copy the built files from the builder stage to the Nginx image
COPY --from=builder /app/client/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]