Files
minio-webui/docker/Dockerfile.frontend
T
paul 7ba1b8b054 fix: Resolve TypeScript type error and Docker warning
- Make createUser field required in FormData interface to match yup schema
- Add explicit optional handling for username/password in yup schema
- Fix Docker FROM casing warning (as -> AS)
- Ensure TypeScript compilation passes without errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 13:55:01 +02:00

42 lines
839 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Configure npm to use legacy peer deps
RUN npm config set legacy-peer-deps true
# Install dependencies
RUN npm ci
# Copy source files
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy custom nginx config
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
# Copy built application
COPY --from=builder /app/build /usr/share/nginx/html
# Create non-root user
RUN addgroup -g 1001 -S nginx-user && \
adduser -S nginx-user -u 1001
# Update nginx to run as non-root
RUN touch /var/run/nginx.pid && \
chown -R nginx-user:nginx-user /var/run/nginx.pid /var/cache/nginx /var/log/nginx /etc/nginx/conf.d
# Expose ports
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]