docker run -eMINIO_ENDPOINT=your-minio-endpoint -eMINIO_ACCESS_KEY=your-access-key -eMINIO_SECRET_KEY=your-secret-key -eMINIO_BUCKET_NAME=your-bucket-name -eLOCAL_DIRECTORY='/path/to/local/directory'-eSECURE_OPTION=true-eVALID_EXTENSIONS='.jpg,.png,.jpeg' my-minio-uploader
docker run -eMINIO_ENDPOINT=your-minio-endpoint -eMINIO_ACCESS_KEY=your-access-key -eMINIO_SECRET_KEY=your-secret-key -eMINIO_BUCKET_NAME=your-bucket-name -eSECURE_OPTION='true'-eVALID_EXTENSIONS='.jpg,.png,.jpeg'-eLOG_ENABLED='true'-v$(pwd)/images:/app/images my-minio-uploader
```
Environment variables:
- MINIO_ENDPOINT
...
...
@@ -21,15 +21,16 @@ Environment variables:
- MINIO_SECRET_KEY
- MINIO_BUCKET_NAME
- SECURE_OPTION
- LOCAL_DIRECTORY
- FILE_EXTENSION
- LOG_ENABLED
The VALID_EXTENSIONS environment variable is expected to be a comma-separated list of valid file extensions (e.g., .jpg,.png).
Important: Mount your local host machines image directory as volume in the container as /app/images.
The VALID_EXTENSIONS environment variable is expected to be a comma-separated list of valid file extensions (e.g., .jpg,.png,.jp2).
SECURE_OPTION environment variable is used to set the secure option for the MinIO client. It defaults to False if not specified or if set to any value other than the string 'true'. Adjust the environment variables accordingly when running the script.
LOG_ENABLED environment variable is used to control whether logging is enabled. If LOG_ENABLED is set to 'true', logging is set to INFO; otherwise, it is set to ERROR. Adjust the environment variable according to your needs when running the script.
Make sure your script (uploader.py) and the requirements.txt is in the same directory as the Dockerfile.