Docker Community Forums

Share and learn in the Docker community.

Docker compose single volume file fails to sync after modifying on host


(Phinz) #1

Expected behavior

Correct sync of a single mounted file after modifying on host

Actual behavior

No sync of a single mounted file, unexpected behavior and error in the frontend of modified file.
For example PHP files returns “Warning: Unexpected character in input: ’ in /var/www/html/info.php on line 4” after modifying on host.

Information

  • the output of docker log:
    [13:34:55.516][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.520][ProxyProcess ][Info ] proxy << GET /v1.22/images/typo3project/json [13:34:55.523][ProxyProcess ][Info ] proxy >> POST /v1.22/containers/create?name=dockertypo3website_web_1 [rewriteBinds] [13:34:55.523][ProxyProcess ][Info ] Rewrote mount to /c/Users/phinz/Documents/Projekte/docker-typo3-website/web/.htaccess:/var/www/html/.htaccess:rw [13:34:55.524][ProxyProcess ][Info ] Rewrote mount to /c/Users/phinz/Documents/Projekte/docker-typo3-website/web/typo3conf/ext/website:/var/www/html/typo3conf/ext/website:rw [13:34:55.525][ProxyProcess ][Info ] Rewrote mount to /c/Users/phinz/Documents/Projekte/docker-typo3-website/web/typo3conf/LocalConfiguration.php:/var/www/html/typo3conf/LocalConfiguration.php:rw [13:34:55.525][ProxyProcess ][Info ] Rewrote mount to /c/Users/phinz/Documents/Projekte/docker-typo3-website/web/typo3conf/AdditionalConfiguration.php:/var/www/html/typo3conf/AdditionalConfiguration.php:rw [13:34:55.525][ProxyProcess ][Info ] Rewrote mount to /c/Users/phinz/Documents/Projekte/docker-typo3-website/web/info.php:/var/www/html/info.php:rw [13:34:55.525][ProxyProcess ][Info ] proxy >> POST /v1.22/containers/create?name=dockertypo3website_web_1 [13:34:55.526][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.639][ProxyProcess ][Info ] proxy << POST /v1.22/containers/create?name=dockertypo3website_web_1 [13:34:55.641][ProxyProcess ][Info ] proxy >> GET /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/json [13:34:55.641][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.646][ProxyProcess ][Info ] trying to rewrite IP addresses for port mapping for f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448 []types.Port{} [13:34:55.646][ProxyProcess ][Info ] proxy << GET /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/json [13:34:55.649][ProxyProcess ][Info ] proxy >> POST /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/attach?stderr=1&logs=0&stream=1&stdout=1 [13:34:55.649][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.651][ProxyProcess ][Info ] Upgrading to raw stream [13:34:55.654][ProxyProcess ][Info ] proxy >> GET /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/json [13:34:55.654][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.659][ProxyProcess ][Info ] trying to rewrite IP addresses for port mapping for f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448 []types.Port{} [13:34:55.659][ProxyProcess ][Info ] proxy << GET /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/json [13:34:55.662][ProxyProcess ][Info ] proxy >> POST /v1.22/networks/dockertypo3website_default/disconnect [13:34:55.662][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.760][ProxyProcess ][Info ] proxy << POST /v1.22/networks/dockertypo3website_default/disconnect [13:34:55.762][ProxyProcess ][Info ] proxy >> POST /v1.22/networks/dockertypo3website_default/connect [13:34:55.762][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:55.774][ProxyProcess ][Info ] proxy << POST /v1.22/networks/dockertypo3website_default/connect [13:34:55.776][ProxyProcess ][Info ] proxy >> POST /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/start [start] [13:34:55.777][ProxyProcess ][Info ] proxy >> POST /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/start [13:34:55.777][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:34:56.544][ProxyProcess ][Info ] proxy << POST /v1.22/containers/f5e7a7cf355d583482239e0aaeb47111b9645880e177375c001a3a9ec8de7448/start [13:34:56.579][ProxyProcess ][Info ] proxy >> GET /v1.22/events?filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Ddockertypo3website%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D [13:34:56.580][ProxyProcess ][Info ] Dial Hyper-V socket e46656d2-f1e2-462a-ad3e-555ac000773c:23a432c2-537a-4291-bcb5-d62504644739 [13:36:51.497][FeedbackSettings][Info ] Open forums

  • docker version
    $ docker info Containers: 2 Running: 2 Paused: 0 Stopped: 0 Images: 8 Server Version: 1.12.0-rc2 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 57 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host bridge overlay null Swarm: inactive Runtimes: default Default Runtime: default Security Options: seccomp Kernel Version: 4.4.13-moby Operating System: Alpine Linux v3.4 OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 1.951 GiB Name: moby ID: JGUD:LJD2:6OH4:THOJ:LDDB:XQKM:37WX:5U5I:7IP3:QLNB:IBJH:5T6V Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Username: phinz Registry: https://index.docker.io/v1/ Experimental: true Insecure Registries: 127.0.0.0/8

  • host distribution and version
    Microsoft Windows 10 Enterprise

Steps to reproduce the behavior

  1. create a docker-compose.yml with following content:

version: "2" services: web: image: php:7.0-apache volumes: - ./info.php:/var/www/html/info.php ports: - "80:80"
2. create the info.php file with following content:
<?php phpinfo();
3. Start die docker container "docker-compose up --build"
4. open the info.php file in the browser "http://docker/info.php"
5. Modify the info.php file on your host and reload the info.php in the browser
<?php echo "Hello World"; phpinfo();
6. You should see some Errors like “Warning: Unexpected character in input: ’ in /var/www/html/info.php on line 3”

Has somebody the same behavior or any ideas whats wrong?


Php.ini file makes it to my container, but has no impact on phpinfo();