I’ve been doing some plugin/MFE development with tutor using Docker Desktop for Mac, and a recent upgrade from Docker Desktop 4.5 to 4.6 (which includes upgrades of
docker-compose) seems like it may have broken
tutor dev runserver lms.
❯ tutor dev runserver lms The lms service will be available at http://local.overhang.io:8000 docker-compose -f /Users/mpwheel/projects/partnerships/.local/tutor/env/local/docker-compose.yml -f /Users/mpwheel/projects/partnerships/.local/tutor/env/dev/docker-compose.yml --project-name partnerships_dev run --rm --service-ports lms [+] Running 9/0 ⠿ Container partnerships_dev-smtp-1 Created 0.0s ⠿ Container partnerships_dev-redis-permissions-1 Created 0.0s ⠿ Container partnerships_dev-redis-1 Created 0.0s ⠿ Container partnerships_dev-mongodb-permissions-1 Created 0.0s ⠿ Container partnerships_dev-mongodb-1 Created 0.0s ⠿ Container partnerships_dev-mysql-1 Created 0.0s ⠿ Container partnerships_dev-elasticsearch-permissions-1 Created 0.0s ⠿ Container partnerships_dev-lms-permissions-1 Created 0.0s ⠿ Container partnerships_dev-elasticsearch-1 Created 0.0s [+] Running 10/10 ⠿ Container partnerships_dev-elasticsearch-permissions-1 Started 0.4s ⠿ Container partnerships_dev-mongodb-permissions-1 Started 0.5s ⠿ Container partnerships_dev-mysql-1 Started 0.6s ⠿ Container partnerships_dev-lms-permissions-1 Started 0.4s ⠿ Container partnerships_dev-smtp-1 Started 0.5s ⠿ Container partnerships_dev-redis-permissions-1 Started 0.4s ⠿ Container partnerships_dev-elasticsearch-1 Started 0.7s ⠿ Container partnerships_dev-redis-1 Started 0.8s ⠿ Container partnerships_dev-mongodb-1 Started 0.7s ⠿ Container partnerships_dev-lms-1 Started 0.4s Error response from daemon: driver failed programming external connectivity on endpoint partnerships_dev_lms_run_83f555e97ebd (f300565a822d3f98a39275a6ba2c0480cfc6ecaa6a10ff550929592a3f60a436): Bind for 0.0.0.0:8000 failed: port is already allocated Error: Command failed with status 1: docker-compose -f /Users/mpwheel/projects/partnerships/.local/tutor/env/local/docker-compose.yml -f /Users/mpwheel/projects/partnerships/.local/tutor/env/dev/docker-compose.yml --project-name partnerships_dev run --rm --service-ports lms
(Note that I am using a custom project name here, but this error occurs regardless.)
What I think may be happening is that the command is starting
lms-1, which is occupying port 8000, so when the
lms_run container tries to start it is unable to use port 8000.
tutor dev runserver lms worked correctly with Docker Desktop v4.5 (which includes docker v20.10.12 and compose v2.2.3). Something about the upgrade to Docker Desktop v4.6 (docker v20.10.13 / compose v2.3.3) seems to have caused it to stop working. I’m not an expert on Docker or containers, but the compose 2.2.3-to-2.3.3 upgrade would be my first guess.
Anyway, I’m curious if anyone else is running into this issue, and if there are any workarounds available (or maybe I am just missing something obvious).