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.

  • Is it /download or /downloads? – Michael Hampton May 22 at 0:34
  • It is /downloads, Wich is not exposed as volume not in the Dockerfile nor at the command line. Anyway, I tested with different names, but mounting still failing. – Amitie 10g May 22 at 2:03

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.