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>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install MinIO client
|
||||
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && \
|
||||
# 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/
|
||||
|
||||
@@ -14,9 +15,13 @@ 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
|
||||
RUN NODE_ENV=development npm install && \
|
||||
npm rebuild bcrypt --build-from-source
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p logs temp && \
|
||||
@@ -25,6 +30,10 @@ RUN mkdir -p 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user