Can't get docker-compose to work

build-and-test (#8183571646) · Jobs · Kai Hendry / docker-compose-ftw · GitLab and the repo showcases that docker compose doesn’t ever come up.

What am I missing please on .gitlab-ci.yml · main · Kai Hendry / docker-compose-ftw · GitLab please?

Got a clue from gitlab-ci.yml & docker-in-docker (dind) & curl returns connection refused on shared runner - Stack Overflow

But the localhost alias doesn’t work!

So I have to update my ci to curl to docker and then it does:

build-and-test:
  image: docker:latest
  services:
    - docker:dind
  before_script:
    - apk add --no-cache docker-compose curl
  script:
    - docker-compose up --detach --wait --quiet-pull
    # gitlab bizzarely doesn't support localhost. You will hit "Connection refused" or "Could not connect to server"
    - curl -iv http://docker:8888