Docker compose "services must be a mapping"

Hi all,

Preliminary apologies for formatting or post location issues - I’m a newbie.

I’m attempting to get a docker container running based off of an online write up and I’m having issues getting it to validate. I’ve run this same code through several online validation tools and they all come back as valid but I get “services.trilium must be a mapping” when running docker-compose up -d && docker-compose logs -f.

I’ve read through all the other posts I could find for this error and they all suggest indentation as the issue - which I’ve gone through several times and I’m just not seeing it, nor are the validation tools.

Any pointers would be appreciated. Thanks

version: '3.3'
services:
  trilium:
    ports:
      - '8290:8080'
    volumes:
      - '~/trilium-data:/home/node/trilium-data'
    image: 'zadam/trilium:0.56-latest'

Since you are using the docker-compose commands instead of docker compose commands, you are possibly using an old version of compose. The yaml is correct. If yours not, you either copied a different config file or an invalid non-printable character was removed when you copy pasted it.

I tried each of your suggestions independently with no success - but then I tried both of them and the combination of both (copying the valid code from my first post to ensure no non-printable characters and using docker compose) seemingly was the solution. Thank you