Docker compose volume syntax valid for Windows and Linux We have developers working on an app using both Windows and Linux. The application is built within a Docker container, and ships a docker-compose specification for the build environment.

The local directory is mounted as a volume: 

    volumes:
      - ${PWD}:/tmp


however this doesn't work in Windows because $PWD is not defined. 

My question is:

Can we have a single docker-compose.yml to satisfy both the Windows and Linux developers?

The obvious way to do this seems to me to have two docker-compose files, one for each OS.
Yes.  Just use ./ for you current directory that the Docker-compose file is in.  Docker-Compose does not allow you to use a context that is located above the compose file, so everything the compose file will use is below the folder with the .yml.  Your "working directory" for the compose file is just "./".  If you are trying to set a directory below that it would look something like: volumes:
  - ./DirectoryIWantToTarget:/tmp

There's an example of this in the Docker-Compose documentation here.  This approach makes the solution cross-platform as well.