Mounted volume is empty inside container

Aside from the answers here, it might have to do with drive sharing in Docker Setting. On Windows, I discovered that drive sharing needs to be enabled.

In case it is already enabled and you recently changed your PC's password, you need to disable drive sharing (and click "Apply") and re-enable it again (and click "Apply"). In the process, you will be prompted for your PC's new password. After this process, run your docker command (run or compose) again enter image description here


Try using:

volumes:
  - ./server:/server

instead of server/ -- there are some cases where Docker doesn't like the trailing slash.