Mount s3fs as docker volume Mount s3fs as docker volume docker docker

Mount s3fs as docker volume


I've made it!

The configuration looks like this:

docker-compose.yml

volumes:  s3data:    driver: localservices:  s3vol:    image: elementar/s3-volume    command: /data s3://{BUCKET NAME}    environment:      - BACKUP_INTERVAL={INTERVALL IN MINUTES (2m)}      - AWS_ACCESS_KEY_ID={KEY}      - AWS_SECRET_ACCESS_KEY={SECRET}    volumes:      - s3data:/data

And after inserting this into the docker-compose file you can use the s3 storage as volume. Like this:

docker-compose.yml

linux:  image: {IMAGE}  volumes:    - s3data:/data

Hope this helps some of you in the future!

Cheers.