a91d56751c
- 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>
1.8 KiB
1.8 KiB
Environment Variable Truncation Fix
Issue
Environment variables with special characters (like $ in bcrypt hashes) were being truncated when passed to Docker containers, causing authentication failures.
Solution
-
Created proper .env file with quoted values:
ADMIN_PASSWORD_HASH='$2b$12$LQv7c3SijBJLhSHPDOLkDe7YfPzFaXhJNXLKqFsFC37GA9xc1wSNi' JWT_SECRET='your-very-long-secret-key-that-should-be-at-least-32-characters-long' -
Added Docker network to ALLOWED_IPS:
- Added
172.20.0.0/16to support Docker's default bridge network - This allows testing from the Docker host
- Added
-
Default credentials:
- Password:
admin123 - The hash in .env corresponds to this password
- Password:
Verification
Run the verification script:
./scripts/verify-env-fix.sh
This script will:
- Rebuild containers
- Check environment variables are properly loaded
- Test authentication API
- Show if login is working
Testing Login
- Access the WebUI at http://localhost:7511
- Use password:
admin123 - You should be able to log in successfully
Known Issue: bcrypt Architecture
Due to architecture differences (ARM vs x86), bcrypt may need to be rebuilt after container restart:
# Fix bcrypt after container restart
docker exec minio-webui-backend-dev sh -c 'rm -rf /app/node_modules/bcrypt && cd /app && npm install bcrypt' && docker restart minio-webui-backend-dev
Troubleshooting
If issues persist:
- Check that .env file exists and has double dollar signs ($$) for escaping
- Ensure Docker containers were rebuilt:
docker compose -f docker-compose.dev.yml up -d --build - Check logs:
docker logs minio-webui-backend-dev - Run debug script:
./scripts/debug-auth.sh - If bcrypt error occurs, run the fix command above