Unable to build docker image, "Value "mastodon" invalid for option gid (number expected)"

I’m currently moving my Mastodon instance over to Docker, and I’m building using this guide:

Every time I run the first “sudo docker-compose build” command though, it ends with an error:

"Value “mastodon” invalid for option gid (number expected)

The command returned a non-zero code: 1"

Is there something I might be doing wrong? I’ve been using docker for a while, but this is my first time using docker-compose. I’ve checked while troubleshooting with another user and the Dockerfile is the same as the one in the repo.

Edit: This is the full error towards the end:

“Service ‘web’ failed to build: The command ‘/bin/sh -c apt update && echo “Etc/UTC” > /etc/localtime && ln -s /opt/jemalloc/lib/* /usr/lib/ && apt install -y whois wget && addgroup --gid $GID mastodon && useradd -m -u $UID -g $GID -d /opt/mastodon mastodon && echo “mastodon:head /dev/urandom | tr -dc A-Za-z0-9 | head -c 24 | mkpasswd -s -m sha-256” | chpasswd’ returned a non-zero code: 1”

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Apparently the $GID und possibly $UID environment variables where not set properly.