run
wants absolute paths. You’re trying to use relative path here but starting them with /
(I’m not sure why Compose lets you get away with this – it should be ./ghost/volumes/content
if I understand correctly). Since that directory doesn’t exist on the host docker will go and create it then bind mount that empty directory into the container.
If you’re going to use docker run
you have to do something like -v $(pwd)/ghost/volumes/config.js:/var/lib/ghost/config.js
or (the expansion of that subshell) -v /home/myuser/git-repo-projectname/_apps/userid/ghost/volumes/config.js:/var/lib/ghost/config.js