Two possible answers to your problem. I'm struggling with this right now as well, so YMMV.
First, if you're running the Docker container on your host, you can always pause it docker pause
, create a new image from the running container docker commit
, then push it to a private repository docker push
(a live Wordpress install is probably not appropriate for the public Docker Hub). Once that's done, you can resume the container docker unpause
and then you can go update the image on your dev system. Then come back once the upgrade is in and tested and all is good, and then docker pull
the image and restart your service so it uses the new image.
Not a great solution, but it will work.
Based on the comment by Tadeusz, I wouldn't necessarily run your whole WP install from a data volume. They are volatile and if, for any reason, your container gets deleted and it's the only one referencing the data volume, then you lose everything (unless you keep multiple backups -- you do keep multiple backups, right?)
The other solution I'm considering is having plugin changes be deployed as part of the Dockerfile. A much more deliberate approach, but can be webhooked such that it automatically builds a new Docker image when you commit to your Github repo. There's discussion of doing that automatic build process here. The server admin end of things on your end hosting will need to pull a the new image as I mentioned above. And done.
Of course, setting this up is left as an exercise for your dev system.
Cheers!