urdf-visualizer / Dockerfile
jurmy24's picture
fix: update dockerfile
6dbf2bd
raw
history blame
575 Bytes
FROM node:18-alpine AS build
# Set working directory
WORKDIR /app
# Copy the viewer directory with all its contents
COPY viewer/ .
# Install dependencies without frozen lockfile to allow migration from package-lock.json
RUN npm install
# Build the application with more verbose output
RUN npm run build || (echo "Build failed. Check the error messages above." && exit 1)
# Production stage
FROM nginx:alpine
# Copy built assets from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]