skip to Main Content

Docker starts up and the project works,
but if I change any file in the project via IDE, after refreshing the page in the browser, these changes are not visible.
the docker container does not see them, only after restarting apache will it update on the docker (not always).
As if he were holding a cache and just downloading it.

Problems began to occur after the last docker desktop update.

Please direct me to solve the problem.

EDIT:

Docker-compose.yml

version: '3'
services:
   web:
       image: project
       build: ./docker/web/
       container_name: project
       restart: unless-stopped
  links:
       - redis
       - db
  ports:
       - 8080:80
       - 443:443
  volumes:
        - './:/var/www/app'
        - './docker/web/sites-enabled:/etc/apache2/sites-enabled'
  depends_on:
        - redis
        - db
  environment:
       CONTAINER_ROLE: app
       APP_ENV: ${APP_ENV}
       TZ: "Europe/Warsaw"

2

Answers


  1. This is a known issue being worked on with the 2.2.0.0 release.

    https://github.com/docker/for-win/issues/5530

    The filesystem sharing was completely rewritten in this release and there appear to be some bugs reported once it hit GA.

    Login or Signup to reply.
  2. In my case i had to change the workdir path to match the volume path

    docker-compose.yml:

    services:
        web:
            volumes: 
                - .:/usr/src/my_app
    

    Dockerfile:

    WORKDIR /usr/src/my_app
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search