{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/10216","labels_url":"https://api.github.com/repos/docker/docker/issues/10216/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/10216/comments","events_url":"https://api.github.com/repos/docker/docker/issues/10216/events","html_url":"https://github.com/docker/docker/issues/10216","id":54867107,"number":10216,"title":"Root btrfs volume visible under overlays in all docker containers","user":{"login":"ComradeP","id":156727,"avatar_url":"https://avatars.githubusercontent.com/u/156727?v=3","gravatar_id":"","url":"https://api.github.com/users/ComradeP","html_url":"https://github.com/ComradeP","followers_url":"https://api.github.com/users/ComradeP/followers","following_url":"https://api.github.com/users/ComradeP/following{/other_user}","gists_url":"https://api.github.com/users/ComradeP/gists{/gist_id}","starred_url":"https://api.github.com/users/ComradeP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ComradeP/subscriptions","organizations_url":"https://api.github.com/users/ComradeP/orgs","repos_url":"https://api.github.com/users/ComradeP/repos","events_url":"https://api.github.com/users/ComradeP/events{/privacy}","received_events_url":"https://api.github.com/users/ComradeP/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/kind/security","name":"kind/security","color":"CF6F90"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-20T10:34:50Z","updated_at":"2015-04-15T16:34:03Z","closed_at":null,"body":"**Description of problem**: Running Debian-packaged docker 1.3.3, on a btrfs filesystem (and hence defaulting to the btrfs backend).\r\n\r\nAny container I create (including during `docker build`) has my host's root btrfs volume mounted as the basis of its root; the overlay filesystems are on top of it, but in particular any file from my root volume that's not explicitly deleted in an overlay is visible in the container.\r\n\r\nThis is particularly annoying for several common aspects of `/etc`, for example `/etc/apt/sources.list.d`, which adds my own sources into the `apt-get` configuration of any image I build, and `/etc/ld.so.conf.d`, which messes with the dynamic linker configuration in the running container.\r\n\r\n\r\n`docker version`:\r\n```\r\nClient version: 1.3.3\r\nClient API version: 1.15\r\nGo version (client): go1.3.3\r\nGit commit (client): d344625\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.3.3\r\nServer API version: 1.15\r\nGo version (server): go1.3.3\r\nGit commit (server): d344625\r\n```\r\n\r\n`docker info`:\r\n```\r\nContainers: 51\r\nImages: 417\r\nStorage Driver: btrfs\r\nExecution Driver: native-0.2\r\nKernel Version: 3.16.0-4-amd64\r\nOperating System: Debian GNU/Linux 8 (jessie)\r\nWARNING: No memory limit support\r\nWARNING: No swap limit support\r\n```\r\n\r\n`uname -a`:\r\n```\r\nLinux $HOSTNAME 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt4-1 (2015-01-16) x86_64 GNU/Linux\r\n```\r\n\r\n**Environment details (AWS, VirtualBox, physical, etc.):** Physical Debian Sid, with a btrfs volume for root and one for `/home`.\r\n\r\n**How reproducible:** Always.\r\n\r\n**Steps to Reproduce:**\r\n1. `docker pull debian` (currently fetches image ID `4d6ce913b130`).\r\n2. `docker run --rm -t -i debian bash -l`\r\n3. In the container: `cat /etc/apt/sources.list.d/spotify.list` (which exists, since it exists on my root file system).\r\n\r\n**Actual Results:** The contents of `/etc/apt/sources.list.d/spotify.list` from the host.\r\n\r\n**Expected Results:** A file-not-found error, as the image doesn't contain this file.\r\n\r\n**Additional info:**\r\n```\r\n### within the running container\r\n# mount \r\n/dev/sdc5 on / type btrfs (rw,relatime,compress=lzo,ssd,space_cache)\r\nproc on /proc type proc (rw,nosuid,nodev,noexec,relatime)\r\ntmpfs on /dev type tmpfs (rw,nosuid,mode=755)\r\nshm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)\r\ndevpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)\r\nsysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)\r\n/dev/sdc5 on /etc/resolv.conf type btrfs (rw,relatime,compress=lzo,ssd,space_cache)\r\n/dev/sdc5 on /etc/hostname type btrfs (rw,relatime,compress=lzo,ssd,space_cache)\r\n/dev/sdc5 on /etc/hosts type btrfs (rw,relatime,compress=lzo,ssd,space_cache)\r\ndevpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)\r\nproc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)\r\nproc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)\r\nproc on /proc/irq type proc (ro,nosuid,nodev,noexec,relatime)\r\nproc on /proc/bus type proc (ro,nosuid,nodev,noexec,relatime)\r\ntmpfs on /proc/kcore type tmpfs (rw,nosuid,mode=755)\r\n# lsblk \r\nNAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT\r\nsda                             8:0    0 465.8G  0 disk \r\n|-sda1                          8:1    0   1.5G  0 part \r\n|-sda2                          8:2    0 251.4G  0 part \r\n`-sda3                          8:3    0  17.6G  0 part \r\nsdb                             8:16   0 931.5G  0 disk \r\n|-sdb1                          8:17   0  29.8G  0 part [SWAP]\r\n|-sdb2                          8:18   0     1K  0 part \r\n`-sdb5                          8:21   0 901.7G  0 part \r\n  |-vg0-root (dm-0)           254:0    0   7.5G  0 lvm  \r\n  |-vg0-var (dm-1)            254:1    0   7.5G  0 lvm  \r\n  |-vg0-usr (dm-2)            254:2    0  14.5G  0 lvm  \r\n  |-vg0-usr--local (dm-3)     254:3    0   7.5G  0 lvm  \r\n  |-vg0-tmp (dm-4)            254:4    0   7.5G  0 lvm  \r\n  |-vg0-srv (dm-5)            254:5    0   7.5G  0 lvm  \r\n  |-vg0-home (dm-6)           254:6    0 476.9G  0 lvm  \r\n  `-vg0-btrfs (dm-7)          254:7    0   256G  0 lvm  \r\nsdc                             8:32   0 931.5G  0 disk \r\n|-sdc1                          8:33   0  29.8G  0 part [SWAP]\r\n|-sdc2                          8:34   0     1K  0 part \r\n`-sdc5                          8:37   0 901.7G  0 part /\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/93478594","html_url":"https://github.com/docker/docker/issues/10216#issuecomment-93478594","issue_url":"https://api.github.com/repos/docker/docker/issues/10216","id":93478594,"user":{"login":"ComradeP","id":156727,"avatar_url":"https://avatars.githubusercontent.com/u/156727?v=3","gravatar_id":"","url":"https://api.github.com/users/ComradeP","html_url":"https://github.com/ComradeP","followers_url":"https://api.github.com/users/ComradeP/followers","following_url":"https://api.github.com/users/ComradeP/following{/other_user}","gists_url":"https://api.github.com/users/ComradeP/gists{/gist_id}","starred_url":"https://api.github.com/users/ComradeP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ComradeP/subscriptions","organizations_url":"https://api.github.com/users/ComradeP/orgs","repos_url":"https://api.github.com/users/ComradeP/repos","events_url":"https://api.github.com/users/ComradeP/events{/privacy}","received_events_url":"https://api.github.com/users/ComradeP/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T16:34:03Z","updated_at":"2015-04-15T16:34:03Z","body":"Yes, `/dev/sdc5` is the btrfs physical volume, and it has subvolumes which are mounted at `/`, `/tmp` and `/home`. Here's the relevant part of `/etc/fstab`:\r\n\r\n```\r\n/dev/sdc5 /               btrfs   defaults,compress=lzo,subvol=@           0       1\r\n/dev/sdc5 /home           btrfs   defaults,compress=lzo,subvol=@home       0       2\r\n/dev/sdc5 /tmp            btrfs   defaults,compress=lzo,subvol=@tmp        0       2\r\n```\r\n\r\nWhat can I do to help reproduce? This is still biting me, 100% reliably."}}