Giter Site home page Giter Site logo

gcsfuse-docker's Introduction

gcsfuse-docker

Docker image for mounting GCS buckets. Container must be started as privileged for mount to succeed. Service account credentials will be picked up at /etc/gcloud/service-account.json. The easiest way to use this to mount a single bucket would be to extend this image, add the service account credentials file you get from Google cloud console and use the gcsfuse mount command directly:

FROM levkuznetsov/gcsfuse-docker

ADD service-account.json /etc/gcloud/service-account.json

CMD ["gcsfuse", "--foreground", "-o", "allow_other", "BUCKET-NAME", "/mnt"]

Do not push any images containing your service account credentials to any public repository!

gcsfuse-docker's People

Contributors

lev-kuznetsov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gcsfuse-docker's Issues

fuse is missing

Hi there!

I'm trying to use the image as explained, but I run into the following error below:

stderr:
fusermount: fuse device not found, try 'modprobe fuse' first

Fuse is installed, but the module doesn't seem to be loaded.

Cheers,
Halfdan

Outdated version

I needed to run this to get it to work (in a GitHub Action)

docker create \
  --privileged \
  --name gcsfuse-docker \
  --volume ${{ github.workspace }}/gcloud:/etc/gcloud \
  --volume ${{ github.workspace }}/mnt:/mnt \
  --tty \
  levkuznetsov/gcsfuse-docker \
  sleep inf
docker start gcsfuse-docker
docker exec gcsfuse-docker apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB 8B57C5C2836F4BEB
docker exec gcsfuse-docker apt-get update
docker exec gcsfuse-docker apt-get dist-upgrade -y --allow-unauthenticated
docker exec gcsfuse-docker gcsfuse --implicit-dirs -o allow_other ${{ secrets.APT_GCS_BUCKET_NAME }} /mnt

Rebuilding this Dockerfile and pushing to Docker Hub would resolve this.

Built exactly per instructions, fails running

vgusev@dellgv ~/devel/levku $ docker build -t levku .
Sending build context to Docker daemon   5.12kB
Step 1/3 : FROM levkuznetsov/gcsfuse-docker
latest: Pulling from levkuznetsov/gcsfuse-docker
d54efb8db41d: Pull complete 
f8b845f45a87: Pull complete 
e8db7bf7c39f: Pull complete 
9654c40e9079: Pull complete 
6d9ef359eaaa: Pull complete 
aee3d63955c3: Pull complete 
1d9d5d12e50e: Pull complete 
Digest: sha256:1e4c5f04f9878fc1604c0485144c0b8c14969e00d3a7872657823edb5b009bc1
Status: Downloaded newer image for levkuznetsov/gcsfuse-docker:latest
 ---> b222ed7c7624
Step 2/3 : ADD service-account.json /etc/gcloud/service-account.json
 ---> eefc0499d066
Removing intermediate container b9cb88e6c625
Step 3/3 : CMD gcsfuse --foreground -o allow_other lk-genotek-prod-public /mnt
 ---> Running in 67c199e8b961
 ---> 1dd06590a08b
Removing intermediate container 67c199e8b961
Successfully built 1dd06590a08b


vgusev@dellgv ~/devel/levku $ docker run 1dd06590a08b
Using mount point: /mnt
Opening GCS connection...

WARNING: gcsfuse invoked as root. This will cause all files to be owned by
root. If this is not what you intended, invoke gcsfuse as the user that will
be interacting with the file system.

Opening bucket...
Mounting file system...
mountWithArgs: mountWithConn: Mount: mount: running fusermount: exit status 1

stderr:
fusermount: fuse device not found, try 'modprobe fuse' first

vgusev@dellgv ~/devel/levku $ 


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.