0

I created a fork of the LinuxServer.io's docker-transmission image, adding support for Google Cloud Storage.

I used the Ernest (chiaen)'s docker-gcsfuse project to build gcsfuse, namely, extracting parts of his Dockerfile and added to my own one. gcsfuse is built using the golang:alpine image.

The image builts successfully (including gcsfuse; the Dockerfile instructs to just copy gcsfuse to /usr/local/bin, and I checked the executable location; also, /dev/fuse is properly exposed from the host-side). However, gcsfuse refuses to mount, and the logs outputs Mount: stat /donwloads: no such file or directory, enev if the directory /downloads actually exists, and the right permissions were set already (set at /etc/cont-init.d/20-config). I even tried to run from the shell, but still fails.

Is there a missing package or parameter in order to get gcsfuse working in my (Alpine) Docker image?

If you want to reproduce, you may bould your own local copy of the image following the instructions at README.md in my repo (you need to upload your json key to the VM) (amitie10g/docker-transmission is also available at Docker Hub).

Logs are available here.

VM images used:

  • Development: Ubuntu 18.04
  • Target: Container-Optimized OS 75-12105.40.0 beta

Docker images used for building:

  • lsiobase/alpine:3.9
  • golang:alpine

Thanks in advance.

Amitie 10g
  • 53
  • 7

1 Answers1

0

I resolved this by building the mount.gcsfuse helper, and populating the /etc/fstab file at /etc/cont-init.d/20.config:

echo "$BUCKET /downloads gcsfuse rw,user,noauto,key_file=/config/gcsfuse-key.json" >> /etc/fstab

Then, running mount.gcsfuse:

s6-setuidgid abc mount.gcsfuse $BUCKET /downloads
Amitie 10g
  • 53
  • 7