So Docker updated automatically and i’ve been changing files on my host and was refreshing the page and nothing was updating.
I then restarted docker and that didn’t work (well it updated to the latest) so i changed something again expecting it to pick it up but it didn’t.
So there’s a bug in version 4.33 for mac and i’ve downgraded to version 4.32 and it’s working as expected when i make a change on the host the volume stays in sync.
here’s my script for creating volumes
docker volume create --driver local --opt type=none --opt device=/var/www --opt o=bind www
docker volume create --driver local --opt type=none --opt device=/var/pgsql --opt o=bind pgsql
sudo chown -R $USER:wheel /var/www
sudo chown -R $USER:wheel /var/pgsql
here’s some of my composer file
volumes:
www:
external: true
pgsql:
external: true
services:
php-fpm:
container_name: php-fpm
restart: always
build:
context: .
dockerfile: ./php/DockerFile
ports:
- “9000:9000”
volumes:
- type: volume
source: www
target: /var/www
volume:
nocopy: true
extra_hosts:
- “myaccount.systemportals.org:10.10.10.50”
httpd:
container_name: httpd
restart: always
build:
context: .
dockerfile: ./httpd/DockerFile
ipc: host
privileged: true
volumes:
- type: volume
source: www
target: /var/www
volume:
nocopy: true
- ./logs:/usr/local/apache2/logs:consistent
ports:
- “80:80”
- “443:443”
depends_on:
- php-fpm