Docker-error when running tutor images build openedx with tutor 17.0.2 (solved)

we have just installed openedx fresh from tutor 17.0.2

We’re trying to build a theme which we have cloned from indigo theme, with tutor images build openedx, but docker is complaining about the command tutor is generating. Specifically, docker is complaining that --tag is an unknown flag.

docker --version yields: Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1
tutor --version yields: tutor, version 17.0.2

See below:

openedx-user@openedx-vm:~/.local/share/tutor/env/build/openedx/themes$ tutor images build openedx

Building image
docker buildx build --output=type=docker --cache-from=type=registry, /home/openedx-user/.local/share/tutor/env/build/openedx
unknown flag: --tag
See 'docker --help'.
Error: Command failed with status 125: docker buildx build --output=type=docker --cache-from=type=registry, /home/oslometx/.local/share/tutor/env/build/openedx

What is your buildx version? (docker buildx version)

**~**$ docker -v
Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1

Thanks for looking at this and pointing us in the right direction!
We’re running on an ubuntu server, and it turned out that docker buildx was not installed.
Installing docker-buildx solved the problem.

Maybe tutor could check if docker buildx is installed/available by running docker buildx version when running “tutor images build openedx” and inform the user if buildx is unavailable (or the script could just run docker buildx version in the beginning, then the output from docker would be enough to identify the cause for failing)

openedx-user@openedx-vm:~$ docker buildx version
docker: ‘buildx’ is not a docker command.
See ‘docker --help’

openedx-user@openedx-vm:~$ apt list --installed | grep docker 24.0.5-0ubuntu1~20.04.1 amd64 [installed,local]
docker/now 1.5-2 all [installed,local]
python3-docker/now 4.1.0-1 all [installed,local]
python3-dockerpty/now 0.4.1-2 all [installed,local]
wmdocker/now 1.5-2 amd64 [installed,local]

openedx-user@openedx-vm:~$ sudo apt install docker-buildx

openedx-user@openedx-vm:~$ docker buildx version
GitHub - docker/buildx: Docker CLI plugin for extended build capabilities with BuildKit 0.11.2 0.11.2-0ubuntu1~20.04.2

openedx-user@openedx-vm:~$ tutor images build openedx # now it works!

Best regards,