Volume mount silently failing on Fedora 38 host

I’m just starting out with Docker, on my first example project, and I’ve run into a problem that’s resisted me for the last hour. I’m on Fedora Workstation 38; Docker v24.0.2, build cb74dfc; Docker Compose v2.18.1; Docker Desktop v4.20.0. To begin, I’m just trying to get Apache up on my localhost, serving files from a host directory. The tutorial I’m using starts me out with docker compose:

# docker-compose.yaml

version: '3.8'
services:
  apache:
    image: httpd:2.4
    container_name: apache
    ports:
      - 80:80
      - 443:443
    volumes:
      - /home/dan/Projects/web/docker-experiment/public_html/:/usr/local/apache2/htdocs/

After docker compose up -d, everything seems to work. Apache is accessible in the browser, and Docker Desktop’s dashboard reads all green.

But Apache isn’t picking up the files in my host’s public_html directory. When I inspect the apache service in Desktop, the correct absolute path is listed. But when I use Desktop’s terminal or file browser to list the contents of htdocs, it’s empty. No error messages appear in Desktop’s logs.

It’s unclear to me what I should do next. I hope I’ve provided enough information, but if not I’m happy to supply more as directed.

Thank you

I took awhile, but I figured it out. I keep my operating system and home directory on a separate filesystem from my projects, so that Docker (and OverlayFS) needed to cross a boundary. That doesn’t work.

Moving my projects to my main filesystem fixed the issue. This isn’t an ideal solution, but it’s good enough for me.