Answer the question
In order to leave comments, you need to log in
How to properly track file changes in a docker container?
Hi all!
There is a project on Laravel, I decided to use docker through laradock for development.
And one point is not clear: I change the contents of the files and there is no reaction, you must first do docker-compose down and then run again. I tried to use docker-sync according to their instructions and also no changes...
If anything, then development is under macos
What am I doing wrong?.. I take
ready -made
dockerfiles
and yaml from the project
https://laradock.io/ compose up -d nginx php-fpm workspace
The yaml has this
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${ APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
and if you substitute data from .env, then it turns out like this
php-fpm:
volumes:
- ./php-fpm/php7.2.ini:/usr/local/etc/php/php.ini
- ../:/var/ www:cached
nginx:
volumes:
- ../:/var/www:cached
That is, as I understand it, when creating a container, the project data is copied to www and the project is launched.
How to throw data into the container again? Or how to make sure that they are not copied to the container, and the container just uses the same files? Or will it not work like that, since the rights to the files will be different? .. This moment is not clear to me.
:cached seems to be to cache the files and supposedly the docker itself will detect the changes and copy them, albeit with a delay.
Or am I completely misunderstanding...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question