b.splendous.net

docker in unraid

November 2021 / tech

I've been looking to sync from my Peleton to my Garmin account. There's been a project (Peleton to Garmin) that I've been using manually, but they just did a big restructure. There are now many more dependencies, and they're now recommending Docker and have distributed an image on DockerHub. This seems great - that'll actually run automatically, and since I have an unraid machine, I can just run it there.

I've only run Docker images that are packaged up for Unraid, so this is new to me and I wanted to record the steps.

First, weirdly it seemed easiest to use the Community Applications plugin to run arbitrary Docker containers, including those from Docker Hub. This took a bit of piecing together, but it was really true (more info https://forums.unraid.net/topic/44702-can-you-use-docker-hub-repositories/ and https://synaptiklabs.com/posts/setup-unraid-to-pull-from-docker-hub/).

After Community Applications is installed:

  • enable Docker Hub in Community Application settings.
  • set up an app data directory - I did this through mkdir -p /user/share/appdata/peleton-to-garmin.
  • find the right entry in the Community Application search. I first tried 'peleton' or 'peleton to garmin' or 'peleton-to-garmin'; none of those worked, but 'philosowaffle' found the right entry, and I clicked install.
  • the peleton-to-garmin instructions recommend docker-compose and a docker-compose file, but it seems overkill for this. Instead I translated the recommended volumes into the Unraid docker configs, and set the TZ as a parameter.

And that was it! I ran it manually the first time, but after that set it to start on boot.

Open question that I haven't solved - while the sync seems to be scheduled to run every so often, mine never triggers unless I restart the instance. That's pretty easy to do, so I haven't investigated this any further. One possible confounding variable is that I often sleep my unraid system (I don't use it that often), so I wonder if that's interfering with the sleep timer?

Update (May 7, 2022): This particular docker started failing with this error:

chown: changing ownership of '/app/configuration.local.json': Read-only file system

The file /app/configuration.local.json was already in my docker configs, so I just changed it to Read/Write (instead of Read-Only). That allowed it to start back up again.