Tutor fails at docker compose -f ... with error "unknown shorthand flag f in -f"

I installed tutor on a fresh install of bookworm on a pi5, following the instructions at Installing Tutor — Tutor documentation, including apt installing docker and docker-compose, as well as the python deps. I needed to pipx tutor instead of pip, but otherwise the instructions seemed to go perfectly.

When I try to tutor local launch as per the quick start, after config I get an error with docker compose.

The last line of output is:

Error: Command failed with status 125: docker compose -f /home/campey/.local/share/tutor/env/local/docker-compose.yml -f /home/campey/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop

What appear to be the relevant lines of output:

==============================================
        Stopping any existing platform
==============================================
docker compose -f /home/campey/.local/share/tutor/env/local/docker-compose.yml -f /home/campey/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop
unknown shorthand flag: 'f' in -f

While writing this I realise this might be due to the big warning in the docs about getting older versions of the docker utilities. I see I have docker 20:

campey@edxpi5:~ $ docker --version
Docker version 20.10.24+dfsg1, build 297e128

So I will go update them, and report back.

Edit: this also appers to be the same error as: Error while installing open edx using tutor, although the thread moves on swiftly and the resolution wasn’t clear.

Logging here in case someone else gets the error, or has advice.

Indeed that did fix the problem, updated docker and now tutor local launch is doing its thing.

Although it wasn’t exactly as straightforward as that…

Got there following steps to install docker “properly” Install Docker Engine on Raspberry Pi OS (32-bit) | Docker Docs

Tried apt approach:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/raspbian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Set up Docker's APT repository:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/raspbian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

but ended up with errors like this:

campey@edxpi5:~ $ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate

So installed with convenience script, and sudo docker run hello-world worked!

tutor local launch still failed, this time due to a permissions issue, followed the instruction for rootless mode:

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
    dockerd-rootless-setuptool.sh install
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.

from the end of the docker installer output, this needed uidmap installed in a special way which it gave instructions for:

campey@edxpi5:~ $ dockerd-rootless-setuptool.sh install
[ERROR] Missing system requirements. Run the following commands to
[ERROR] install the requirements and run this tool again.
########## BEGIN ##########
sudo sh -eux <<EOF
# Install newuidmap & newgidmap binaries
apt-get install -y uidmap
EOF
########## END ##########

This ultimately got my terminal into a hung state showing a pending kernel update modal, but seems to have worked.

After this, was able to setup docker rootless, and then tutor local launch started to work!
\o/