Docker Community Forums

Share and learn in the Docker community.

What PATH I need to use to refer to a container with a mounted volume

I have a container with that runs a Python script. Files of my script are inside an app/ folder on the container. My script generates various file inside the container in a folder called /db.

So my container folder tree looks something like:

├── db/
│ └── generated_file.db

I use this code to locate the directory os.path.join(os.path.dirname(os.path.abspath(__file__)), "db",database.db")

Now, I would like to know the path of the volume mounted seen from inside the container. Let’ say the volume is called my_volume