Ubuntu Trusty with s3fs-fuse and supervisor as base image for other app containers.
docker run --privileged --cap-add SYS_ADMIN --device /dev/fuse -d -e "BUCKETNAME=$BUCKETNAME" -e "AWSACCESSKEYID=$AWSACCESSKEYID" -e "AWSSECRETACCESSKEY=$AWSSECRETACCESSKEY" hiveoss/s3fs
The environment variables are used to indicate the bucket to mount and to provide credentials to access the bucket.
$BUCKETNAME
- the AWS bucket name
$AWSACCESSKEYID
- the AWS key id
$AWSSECRETACCESSKEY
- the AWS secret token
You can overwrite scripts/runS3fs.sh
to change the parameters for the s3fs.
mkdir -p /home/shared/s3 &&
mkdir -p /tmp &&
s3fs $BUCKETNAME /home/shared/s3 -o use_cache=/tmp -o allow_other -o umask=0002 -o use_rrs -f
You can overwrite config/supervisord.conf
to change the parameters for the supervisord. But usually you do not need to unless you need to start additional processes. Noted that daemon is off by default for supervisor.
The default s3 bucket is mounted at /home/shared/s3
.
FROM hiveoss/s3fs
CMD ["/usr/bin/supervisord"]