For me docker buildx wasn't activated yet, but after running:
docker buildx create --use
It worked like a charm.