Error response from daemon: invalid JSON: invalid port '127.0.0.1:2368:2368': invalid syntax

Getting an error after attempting an update from 6.7.0 to 6.8.0 today:

# git pull && docker compose pull && docker compose up -d
Already up to date.
WARN[0000] The "ADMIN_DOMAIN" variable is not set. Defaulting to a blank string. 
[+] Pulling 15/15
 ✔ activitypub-migrate Pulled                                                                                                                                                   1.3s 
 ✔ caddy Pulled                                                                                                                                                                 0.8s 
 ✔ activitypub Pulled                                                                                                                                                           0.8s 
 ✔ db Pulled                                                                                                                                                                    0.4s 
 ✔ ghost Pulled                                                                                                                                                                66.9s 
   ✔ 2d35ebdb57d9 Already exists                                                                                                                                                0.0s 
   ✔ fc2cca81d0de Already exists                                                                                                                                                0.0s 
   ✔ e1acb8d81a6a Already exists                                                                                                                                                0.0s 
   ✔ 5ff8b913658c Already exists                                                                                                                                                0.0s 
   ✔ 93780dcece6a Pull complete                                                                                                                                                 1.5s 
   ✔ 4abb03a2b21b Pull complete                                                                                                                                                 1.8s 
   ✔ 305212959a3c Pull complete                                                                                                                                                13.8s 
   ✔ 11f1d5752b1a Pull complete                                                                                                                                                63.8s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                64.0s 
   ✔ b59a81117abb Pull complete                                                                                                                                                64.3s 
WARN[0000] The "ADMIN_DOMAIN" variable is not set. Defaulting to a blank string. 
[+] Running 3/3
 ✔ Container ghost-db-1           Running                                                                                                                                       0.0s 
 ✔ Container ghost-activitypub-1  Running                                                                                                                                       0.0s 
 ✘ Container ghost-ghost-1        Error response from daemon: invalid JSON: invalid port '127.0.0.1:2368:2368': invalid syntax                                                  0.0s 
Error response from daemon: invalid JSON: invalid port '127.0.0.1:2368:2368': invalid syntax

Not sure what changed, as I’ve not done any mucking around with the .env or any other files since early in 6.x… Site obviously is currently down.

Anyone have any insights?

The compose.yml has a bug/syntax error. The expose property in there is not according to documentation.

This hasn’t been a problem so far, since the field wasn’t really validated by Docker, but the latest Docker version seems to do that. I was able to reproduce your error by updating to Docker 29.0.1 – so, I assume you’ve probably also updated Docker?

Two solutions: you can either downgrade Docker or change the expose property in your compose.yml to:

    expose:
      - "${GHOST_PORT:-2368}"

I’ve also created a PR in ghost-docker, hoping that it gets merged quickly:

3 Likes

You rock.

32 minutes later, solved.

Thank you.

2 Likes