🐳 AWS S3 client, Object Storage client
Path:
AWS S3 Storage mounting path: /s3mnt
- AWS S3
- MinIO
- And all AWS S3 alternative object storage solution
version: '3.7'
services:
s3fs:
container_name: s3fs
image: jkaninda/s3fs
privileged: true
devices:
- "/dev/fuse"
environment:
- ACCESS_KEY=${ACCESS_KEY}
- SECRET_KEY=${SECRET_KEY}
- BUCKET_NAME=${BUCKET_NAME}
- S3_ENDPOINT=${S3_ENDPOINT}
This is a simple example of copying a file from your local storage to S3, and after the copy container will stop running.
To keep the container running you need add --keep
flag.
s3fsc mount --keep
version: '3.7'
services:
s3fs:
container_name: s3fs
image: jkaninda/s3fs
privileged: true
volumes:
- ./backup/:/backup
devices:
- "/dev/fuse"
## Mount S3 Storage and copy a file
command:
- /bin/sh
- -c
- |
s3fsc mount
cp /backup/my_file.gz /s3mnt/my_file.gz
environment:
- ACCESS_KEY=${ACCESS_KEY}
- SECRET_KEY=${SECRET_KEY}
- BUCKET_NAME=${BUCKET_NAME}
- S3_ENDPOINT=${S3_ENDPOINT}
P.S. please give a star if you like it 😉