Docker Community Forums

Share and learn in the Docker community.

Container loses volume mount

beta
docker

(John Hampton) #1

Expected behavior

With docker-compose.yml:

volumes:
  - .:/usr/src/app
  - /usr/src/app/node_modules

The container should have data volume /usr/src/app/node_modules mounted over the /usr/src/app volume.

Actual behavior

Initially all mounts appear as expected. Running docker-compose up followed by docker-compose exec api mount includes the following mount:

/dev/vda2 on /usr/src/app/node_modules type ext4 (rw,relatime,data=ordered)

After modifying and saving a file under /usr/src/app, the mount is no longer listed.

Information

  • Sample project and reproduction instructions are at: https://github.com/johnhampton/docker-beta-mount-bug

  • pinata diagnose -u

    OS X: version 10.11.5 (build: 15F34)
    Docker.app: version v1.11.1-beta13
    Running diagnostic tests:
    [OK] Moby booted
    [OK] driver.amd64-linux
    [OK] vmnetd
    [OK] osxfs
    [OK] db
    [OK] slirp
    [OK] menubar
    [OK] environment
    [OK] Docker
    [OK] VT-x
    Docker logs are being collected into /tmp/20160531-085609.tar.gz
    Most specific failure is: No error was detected
    Your unique id is: 17F2DB74-18B1-4CEA-A3BB-A6015B3EF950
    Please quote this in all correspondence.
    ``


Container loses volume mount on Mac
(John Hampton) #2

I’m still experiencing this problem on Version 1.12.0-rc2-beta16 (build: 9493).


(Johannes Würbach) #3

I’m also seeing this: Version 1.12.0-rc2-beta17


(David Sheets) #4

Beta 21.1 has been released which should resolve this issue. Thank you for your report and reproduction case and for your participation in the Docker for Mac Beta!