Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

S3 volume for docker based on goofys

License

NotificationsYou must be signed in to change notification settings

monder/goofys-docker

Repository files navigation

licenseGitHub tag

goofys-docker is a dockervolume plugin wrapper for S3

Overview

The inital idea behind mounting s3 buckets as docker volumes is to provide store for configs and secrets. The volume as pergoofys does not have features like randow-write support, unix permissions, caching.

Getting started

Requirements

The docker host should haveFUSE support withfusermount cli utility in$PATH

Building

There are prebuilt binaries availblehere. If you need to build it yourself there is a helper filebuild.sh that will run a container that builds the application using go 1.5. Version 1.5 is used to workaroundmoby/moby#20865

Configuration

Currently there is no support for configuration options, but the defaults are reasonable for most of the cases.The most simple way to configure aws credentials is to useIAM roles to access the bucket for the machine,aws configuration file orENV variables. The credentials will be used for all buckets mounted bygoofys-docker.

Running

./goofys-docker

The socket/run/docker/plugins/goofys.sock will be created to interact with docker. Ownership of the file isroot:wheel

Using with docker

Create a new volume by issueing a docker volume command:

docker volume create --name=test-docker-goofys --driver=goofys

That will create a volume connected totest-docker-goofys bucket. The region of the bucket will be autodetected.

Nothing is mounted yet.

Launch the container withtest-docker-goofys volume mounted in/home inside the container

docker run -v test-docker-goofys:/home:ro -it busybox sh/ # cat /home/testtest file content/ # ^D

It is also possible to mount a subfolder:

docker volume create --name=test-docker-goofys/folder --driver=goofysdocker run docker run -v test-docker-goofys/folder:/home:ro -it busybox sh/ # cat /home/testtest file content from folder/ # ^D

If multiple folders are mounted for the single bucket on the same machine, only 1 fuse mount will be created. The mount will be shared by docker containers. It will be unmouned when there be no containers to use it.

License

MIT

About

S3 volume for docker based on goofys

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp