Docker Community Forums

Share and learn in the Docker community.

Docker too slow to pick up changes in local filesystem

docker

(luqo33) #1

Hello,

I attempted to set up a simple WordPress development environment with Docker. The problem is that it takes ages for Docker to pick up changes in the local files that are mounted into the container - it’s like 10 or more seconds until the change is recorded by the container. This is my docker-compose.yml:

wordpress:¬
  image: wordpress¬
  links:¬
    - wordpressdb:mysql¬
  ports:¬
    - 8080:80¬
  volumes:¬
    - ~/dev/docker/wp/src:/var/www/html¬
wordpressdb:¬
  image: mariadb¬
  environment:¬
    MYSQL_ROOT_PASSWORD: pass
phpmyadmin:¬
  image: corbinu/docker-phpmyadmin¬
  links:¬
    - wordpressdb:mysql¬
  ports:¬
    - 8181:80¬
  environment:¬
    MYSQL_USERNAME: usr¬
    MYSQL_ROOT_PASSWORD: pass

Perhaps I did something wrong with volumes?

I’ve used the official WordPress image. The image comes with a WordPress installation inside so in the volumes key, I’ve just mapped the directory in the container with my local directory so that I can introduce changes to code. Unfortunately, delays that I’m experiencing with Docker (until it picks up local changes) are not tolerable. It makes the whole setup essentially unusable. Why is that happening?


(Tsega) #2

Just to let you know I’ve used a very similar setup but it seems to be working just fine. I’m on a Mac with Docker Beta!


(Dvohra) #3

Could be an issue with the CPU not being available. Are other applications consuming excessive CPU?
Allocate more CPU share to the container.
Refer


(Dvohra) #4

Allocate more CPU share to the container.
Refer