Docker Community Forums

Share and learn in the Docker community.

How to give relative path for mount in Dockerfile

Question is also asked here in stackoverflow. Please help

Dockerfile Location:
C:\project\Dockerfiles\core

Source code location which i need to mount: C:\project

Now, how can i mount SRC location from Dockerfile location:

RUN --mount=source=.,target=/opt/trunk

source=. takes current directory. How to pass here C:\project or someting like this ../.. to go back 2 dir up.