-
-
Save GabLeRoux/3b2168a88ceca43ac524e318839dd798 to your computer and use it in GitHub Desktop.
Mount S3 as Docker Volume (docker-compose)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_S3_BUCKET= | |
AWS_S3_ACCESS_KEY_ID= | |
AWS_S3_SECRET_ACCESS_KEY= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
s3fs: | |
privileged: true | |
image: efrecon/s3fs:1.90 | |
restart: unless-stopped | |
env_file: .env | |
volumes: | |
# This also mounts the S3 bucket to `/mnt/s3data` on the host machine | |
- /mnt/s3data:/opt/s3fs/bucket:shared | |
test: | |
image: bash:latest | |
restart: unless-stopped | |
depends_on: | |
- s3fs | |
# Just so this container won't die and you can test the bucket from within | |
command: sleep infinity | |
volumes: | |
- /mnt/s3data:/data:shared |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
its not working