HUB
Sign inSign up
gcsfuse logo

amitie10g/gcsfuse

By amitie10g

•Updated over 2 years ago

Attemp to build an Alpine-based Docker image with the Google's gcsfuse.

Image
0

925

amitie10g/gcsfuse repository overview

⁠docker-gcsfuse

This is an attemp to create an Alpine-based image for the Google's⁠ gcsfuse⁠.

⁠Instructions

⁠Before begin
  • Get your Service Account Key⁠ for your bucket, and upload to gcsfuse-key.json. (if you're running the VM at Google Cloud, the key can be reteived as custom metadata, see bellow).

  • Don't forget to set the right permissions for your bucket.

  • If you're running the VM at Google Cloud,

    • You must configure your Service account⁠ accordingly.

    • You should enable OS Login⁠ and choose the proper Service account.

    • User ID, Gruop ID, Username and Home directory belongs to the OS Login account (that are the same for every instance under the same Service account). scripts/startup-gcloud.sh provides those environment variables.

    • Provide the contents from scripts/startup-gcloud.sh as startup script.

    • Save your Service Account key as a custom metadata named GCSKEY

⁠Running:
⁠Command line
CONTAINER_NAME="gcsfuse"
CONTAINER_IMAGE="amitie10g/gcsfuse"
TZ="UTC"
PUID=<User ID>
PGID=<Group ID>
BUCKET=<GCS bucket>

docker run -t -i -d \
  --name="$CONTAINER_NAME" \
  -e PUID="$PUID" \
  -e PGID="$PGID" \
  -e TZ="$TZ" \
  -e BUCKET="$BUCKET" \
  -v "$LOCAL_HOME/gcs-key.json":/etc/gcs-key.json \
  --device=/dev/fuse \
  --restart no \
  --privileged \
  $CONTAINER_IMAGE
⁠docker-compose style
version: "3.3"
services:
  gcsfuse:
    image: amitie10g/gcsfuse
    container_name: gcsfuse
    environment:
      - PUID=<PUID>
      - PGID=<PGID>
      - BUCKET=<BUCKET>
      - TZ=UTC
    volumes:
      - <path to gcs-key.json>:/etc/gcs-key.json
    restart: no

Tag summary

Content type

Image

Digest

sha256:08e62abf6…

Size

31.8 MB

Last updated

over 2 years ago

docker pull amitie10g/gcsfuse