Kirby on docker crashes with a shared volume

Have been trying all day to get Kirby up and running on a docker container. Tried following the cookbook recipe as well as my own Dockerfile’s & docker-compose files but they all fail on the same issue.

When following the Kirby meets Docker | Kirby CMS tutorial everything goes fine until i add a shared volume:

docker run -d --name mycontainer -p 80:80 \
  --mount type=bind,source=$(pwd)/starterkit,destination=/var/www/html \
  docker-starterkit

This will start up apache, the frontpage will work but as soon as i open the /panel there are api calls being made to /api/site/xxx that will not return any response and crash the container (i even need to restart the whole docker deamon to get stuff down again). No response / errors / logging is given.

However…running

docker run -d --name mycontainer -p 80:80 docker-starterkit

without the shared volume does work.

That looks exactly like the code from the 3rd example in the recipe. The example is using a bind mount. I just tested this again and work without issues for me.

Did you follow the exact steps?

Yes, i followed the exact steps and also tried multiple docker-compose / container variations

Hm, hard to tell what the problem is. What’s your host computer’s OS?

Running it on a Macbook air M1, have not had issues so far with any other docker product…

Sure you rebuild the image after making changes?

Here are the files for example 4 from the recipe: GitHub - texnixe/docker-example

Note that you might have to change the id.env file to your user id

This was tested successfully on my machine.

Yes, same issue (i checked the USERID). Frontend loads fine. Installation succeeds.

The first request in the developers console that does not return a response is http://localhost/api/site/sections/albums?page=1 and after that all requests hang indefinitely.

I’m running Docker Desktop 4.11.0 (83626).

I just unchecked the “Enable VirtioFS accelerated directory sharing” in my Docker config and i do seem to get a administration panel now!

1 Like