goofys on Docker
Description
This is a Docker image recipe to easily use "goofys" to mount AWS S3 storage.
I also publish pre-built images on Docker Hub.
Please contact me anytime if you have a problem or request! My information is posted at the bottom of this document.
Requirements
- Docker
- AWS
- S3 Butcket
- IAM (ACCESS_KEY and SECRET_ACCESS_KEY)
Installation
If you can use the docker
command, no installation is required.
Usage
If the mount directory is not specified,
Using the "BUCKET" environment variable, mount on the "/mnt/${BUCKET}" directory.
$ docker \
run -d --privileged \
-e AWS_ACCESS_KEY_ID=******************** \
-e AWS_SECRET_ACCESS_KEY=**************************************** \
-e BUCKET=************ \
genzouw/goofys
If the mount directory is specified,
Using the "MOUNT_DIR" environment variable, mount on the "${MOUNT_DIR}" directory.
$ docker \
run -d --privileged \
-e AWS_ACCESS_KEY_ID=******************** \
-e AWS_SECRET_ACCESS_KEY=**************************************** \
-e BUCKET=************ \
-e MOUNT_DIR=/mnt/foo \
genzouw/goofys
Customize
You can set any options to the goofys
command.
# Set region
# Use caching
# Can upload, but can't update
$ docker \
run -d --privileged \
-e AWS_ACCESS_KEY_ID=******************** \
-e AWS_SECRET_ACCESS_KEY=**************************************** \
-e BUCKET=************ \
-e MOUNT_DIR=/mnt/foo \
genzouw/goofys \
--region eu-west-1 \
--stat-cache-ttl 1m0s \
--type-cache-ttl 1m0s \
--dir-mode 0700 \
--file-mode 0500
License
This software is released under the MIT License, see LICENSE.
Help
Got a question ?
File a Github issue, send an email to genzouw@gmail.com or tweet to @genzouw on Twitter.
Author Information
- Twitter : @genzouw ( https://twitter.com/genzouw )
- Facebook : genzouw ( https://www.facebook.com/genzouw )
- LinkedIn : genzouw ( https://www.linkedin.com/in/genzouw/ )
- Gmail : genzouw@gmail.com