Files
minio-webui/docker/Dockerfile.backend.dev
T
paul a91d56751c fix: Resolve mc config permission error and add MinIO setup documentation
- Replace read-only host mount with dedicated Docker volume for mc config
- Add init-mc-config.sh to initialize mc configuration with proper permissions
- Create setup-mc-alias.sh script to configure MinIO connection
- Add comprehensive MINIO_SETUP.md documentation
- Update docker-compose.dev.yml to use mc-config volume
- Update Dockerfile to run mc config initialization
- Document bcrypt architecture workaround in FIX_ENV_TRUNCATION.md

The mc client can now write to its configuration directory, resolving
the "permission denied" error when connecting to MinIO servers.

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

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

50 lines
1.3 KiB
Docker

FROM node:20-alpine
# Install MinIO client (detect architecture)
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g') && \
wget https://dl.min.io/client/mc/release/linux-${ARCH}/mc && \
chmod +x mc && \
mv mc /usr/local/bin/
# Install development dependencies
RUN apk add --no-cache bash
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install build tools for compilation (keep them in dev environment)
RUN apk add --no-cache python3 make g++
# Install all dependencies (including devDependencies for development)
# Make sure NODE_ENV is not set to production during install
RUN NODE_ENV=development npm install && \
npm rebuild bcrypt --build-from-source
# Create necessary directories
RUN mkdir -p logs temp && \
chmod 755 logs temp
# Copy application files
COPY . .
# Copy and run mc config initialization script
COPY init-mc-config.sh /tmp/init-mc-config.sh
RUN chmod +x /tmp/init-mc-config.sh && /tmp/init-mc-config.sh && rm /tmp/init-mc-config.sh
# Change ownership of everything to node user (built-in)
RUN chown -R node:node /app
# Switch to non-root user
USER node
# Set development environment
ENV NODE_ENV=development
# Expose port
EXPOSE 7510
# Start the application in development mode
CMD ["npm", "run", "dev"]