Dockerfile and volumes
ccalhoun
PROOP

9 months ago

Within my Dockerfile, I'm declaring the WORKDIR as /usr/src/app
Do I make the volume mount path the same?

7 Replies

ccalhoun
PROOP

9 months ago

N/A


patod01
HOBBY

9 months ago

that would depend on your needs


patod01
HOBBY

9 months ago

for the image, it's just the working directory as the command says


patod01
HOBBY

9 months ago

and it will be the output of the pwd command if you execute that in the image


patod01
HOBBY

9 months ago

where you mount the volume is completely independent and is defined through absolute paths


patod01
HOBBY

9 months ago

the only caveat would be if your app's scope is the same than the working directory and you decide to attach your volume outside of it, so you wouldn't have access to the volume


ccalhoun
PROOP

9 months ago

Using Nixpack was the better route.


Loading...