I’m on OS X using the Virtualbox driver for docker. Using the official WordPress docker image, I setup a volume from my local machine to map to the container
/Users/gezimhome/projects/zr/src
:/var/www/html/wp-content/plugins/zr
When I update files in the host, they show updated in the container but changes don’t reflect on the website until a few minutes later. I suspect it might be Apache caching something as I don’t have any WordPress caching plugins installed.
Update: I’ve not tried other types of files. The PHP files are not being updated when I load the site in the browser (or even using curl
).
Update 2: Here’s the .htaccess file.
Here’s the docker virtualbox info
It turns out this was caused by opcache in PHP. Opcache was enabled in the wordpress docker image as follows:
So, I created a new docker image for wordpress that disables caching. It’s essentially this: