Bind mount external volume path instead of /srv in docker for PMM data

Just curious here, when I try to bind mount the percona image I found my /srv folder is empty.

If I run:
docker run -v /mnt/myhostmount:/srv -p 443:443 percona/pmm-server:2

I get an empty dir where mnt/myhostmount has nothing and of course since there’s no config, nothing works. I will mention that I have taken the image and further added a few things to it to customize it for my own use, but haven’t really done anything beyond copying a few other files/scripts that I needed for some things.

To summarize my changes, most of them are just running yum updates so I don’t have old packages and then adding a few scripts. I tried:
VOLUME /srv
but either way this just gives me an empty volume at /mnt/myhostmount

1 Like