{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18151","labels_url":"https://api.github.com/repos/docker/docker/issues/18151/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18151/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18151/events","html_url":"https://github.com/docker/docker/issues/18151","id":118258309,"number":18151,"title":"userns: rm: cannot remove '/var/lib/apt/lists/partial': Operation not permitted","user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/storage/overlay","name":"area/storage/overlay","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-11-22T11:27:08Z","updated_at":"2015-12-10T16:26:10Z","closed_at":null,"body":"Description of problem:\r\n\r\ndocker build fails to build a simple `Dockerfile` with (more in the reproduction below):\r\n```\r\nRunning hooks in /etc/ca-certificates/update.d....done.\r\nrm: cannot remove '/var/lib/apt/lists/partial': Operation not permitted\r\nThe command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends    ca-certificates    curl    && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1\r\n```\r\n\r\n`docker version`:\r\n```\r\nClient:\r\n Version:      1.10.0-dev\r\n API version:  1.22\r\n Go version:   go1.5.1\r\n Git commit:   3ff9bb5\r\n Built:        Sat Nov 21 16:03:51 UTC 2015\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n\r\nServer:\r\n Version:      1.10.0-dev\r\n API version:  1.22\r\n Go version:   go1.5.1\r\n Git commit:   3ff9bb5\r\n Built:        Sat Nov 21 16:03:51 UTC 2015\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\n`docker info`:\r\n```\r\nContainers: 9\r\nImages: 53\r\nServer Version: 1.10.0-dev\r\nStorage Driver: overlay\r\n Backing Filesystem: extfs\r\nExecution Driver: native-0.2\r\nLogging Driver: journald\r\nPlugins: \r\n Volume: local\r\n Network: bridge null host\r\nKernel Version: 4.2.6-300.fc23.x86_64\r\nOperating System: Fedora 23 (Workstation Edition)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 11.44 GiB\r\nName: localhost.localdomain\r\nID: SP2V:VTP3:V6ZK:RMJZ:UADA:V2UM:IHXB:WPCM:BMQ6:NTQX:4W43:CRYE\r\nDebug mode (server): true\r\n File Descriptors: 14\r\n Goroutines: 28\r\n System Time: 2015-11-22T12:16:35.687308737+01:00\r\n EventsListeners: 0\r\n Init SHA1: dd81947525a7b52db7d8cc15ed0d11db0717be51\r\n Init Path: \r\n Docker Root Dir: /var/lib/docker/100000.100000\r\nUsername: runcom\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: true\r\n```\r\n\r\n`uname -a`:\r\n```\r\nLinux localhost.localdomain 4.2.6-300.fc23.x86_64 #1 SMP Tue Nov 10 19:32:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\nEnvironment details (AWS, VirtualBox, physical, etc.):\r\n\r\n**physical**\r\n\r\nHow reproducible:\r\n\r\n**Always**\r\n\r\n\r\nSteps to Reproduce:\r\n1. \r\n\r\nstart the daemon with `/usr/bin/docker daemon -D -H fd:// -H tcp://127.0.0.1:2375 --userland-proxy=false -s overlay --log-driver=journald --exec-opt native.cgroupdriver=cgroupfs --userns-remap=default`\r\n\r\n2.\r\n```\r\ncat - > Dockerfile << EOF\r\nFROM debian:jessie\r\nRUN groupadd -r redis && useradd -r -g redis redis\r\nRUN apt-get update && apt-get install -y --no-install-recommends \\\r\n   ca-certificates \\\r\n   curl \\\r\n   && rm -rf /var/lib/apt/lists/*\r\nEOF\r\n```\r\n\r\n3. `docker build .`\r\n\r\n\r\nActual Results:\r\n```\r\nSending build context to Docker daemon  2.56 kB\r\nStep 1 : FROM debian:jessie\r\n ---> a604b236bcde\r\nStep 2 : RUN groupadd -r redis && useradd -r -g redis redis\r\n ---> Using cache\r\n ---> 1dafae223d73\r\nStep 3 : RUN apt-get update && apt-get install -y --no-install-recommends    ca-certificates    curl    && rm -rf /var/lib/apt/lists/*\r\n ---> Running in 1c830ef356cf\r\nGet:1 http://security.debian.org jessie/updates InRelease [63.1 kB]\r\nGet:2 http://security.debian.org jessie/updates/main amd64 Packages [189 kB]\r\nGet:3 http://httpredir.debian.org jessie-updates InRelease [135 kB]\r\nIgn http://httpredir.debian.org jessie InRelease\r\nGet:4 http://httpredir.debian.org jessie Release.gpg [2373 B]\r\nGet:5 http://httpredir.debian.org jessie-updates/main amd64 Packages [3619 B]\r\nGet:6 http://httpredir.debian.org jessie Release [148 kB]\r\nGet:7 http://httpredir.debian.org jessie/main amd64 Packages [9035 kB]\r\nFetched 9577 kB in 43s (219 kB/s)\r\nReading package lists...\r\nReading package lists...\r\nBuilding dependency tree...\r\nReading state information...\r\nThe following extra packages will be installed:\r\n  libcurl3 libffi6 libgmp10 libgnutls-deb0-28 libgssapi-krb5-2 libhogweed2\r\n  libidn11 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2\r\n  libnettle4 libp11-kit0 librtmp1 libsasl2-2 libsasl2-modules-db libssh2-1\r\n  libssl1.0.0 libtasn1-6 openssl\r\nSuggested packages:\r\n  gnutls-bin krb5-doc krb5-user\r\nRecommended packages:\r\n  krb5-locales libsasl2-modules\r\nThe following NEW packages will be installed:\r\n  ca-certificates curl libcurl3 libffi6 libgmp10 libgnutls-deb0-28\r\n  libgssapi-krb5-2 libhogweed2 libidn11 libk5crypto3 libkeyutils1 libkrb5-3\r\n  libkrb5support0 libldap-2.4-2 libnettle4 libp11-kit0 librtmp1 libsasl2-2\r\n  libsasl2-modules-db libssh2-1 libssl1.0.0 libtasn1-6 openssl\r\n0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 5121 kB of archives.\r\nAfter this operation, 12.6 MB of additional disk space will be used.\r\nGet:1 http://security.debian.org/ jessie/updates/main libkrb5support0 amd64 1.12.1+dfsg-19+deb8u1 [58.7 kB]\r\nGet:2 http://security.debian.org/ jessie/updates/main libk5crypto3 amd64 1.12.1+dfsg-19+deb8u1 [115 kB]\r\nGet:3 http://security.debian.org/ jessie/updates/main libkrb5-3 amd64 1.12.1+dfsg-19+deb8u1 [302 kB]\r\nGet:4 http://security.debian.org/ jessie/updates/main libgssapi-krb5-2 amd64 1.12.1+dfsg-19+deb8u1 [151 kB]\r\nGet:5 http://security.debian.org/ jessie/updates/main libsasl2-modules-db amd64 2.1.26.dfsg1-13+deb8u1 [67.1 kB]\r\nGet:6 http://security.debian.org/ jessie/updates/main libsasl2-2 amd64 2.1.26.dfsg1-13+deb8u1 [105 kB]\r\nGet:7 http://security.debian.org/ jessie/updates/main libldap-2.4-2 amd64 2.4.40+dfsg-1+deb8u1 [218 kB]\r\nGet:8 http://httpredir.debian.org/debian/ jessie/main libssl1.0.0 amd64 1.0.1k-3+deb8u1 [1038 kB]\r\nGet:9 http://httpredir.debian.org/debian/ jessie/main libnettle4 amd64 2.7.1-5 [176 kB]\r\nGet:10 http://httpredir.debian.org/debian/ jessie/main libffi6 amd64 3.1-2+b2 [20.1 kB]\r\nGet:11 http://httpredir.debian.org/debian/ jessie/main libgnutls-deb0-28 amd64 3.3.8-6+deb8u3 [694 kB]\r\nGet:12 http://httpredir.debian.org/debian/ jessie/main libgmp10 amd64 2:6.0.0+dfsg-6 [253 kB]\r\nGet:13 http://httpredir.debian.org/debian/ jessie/main libhogweed2 amd64 2.7.1-5 [125 kB]\r\nGet:14 http://httpredir.debian.org/debian/ jessie/main openssl amd64 1.0.1k-3+deb8u1 [677 kB]\r\nGet:15 http://httpredir.debian.org/debian/ jessie/main libp11-kit0 amd64 0.20.7-1 [81.2 kB]\r\nGet:16 http://httpredir.debian.org/debian/ jessie/main libkeyutils1 amd64 1.5.9-5+b1 [12.0 kB]\r\nGet:17 http://httpredir.debian.org/debian/ jessie/main libidn11 amd64 1.29-1+b2 [136 kB]\r\nGet:18 http://httpredir.debian.org/debian/ jessie/main libtasn1-6 amd64 4.2-3+deb8u1 [48.9 kB]\r\nGet:19 http://httpredir.debian.org/debian/ jessie/main librtmp1 amd64 2.4+20150115.gita107cef-1 [59.8 kB]\r\nGet:20 http://httpredir.debian.org/debian/ jessie/main libssh2-1 amd64 1.4.3-4.1 [125 kB]\r\nGet:21 http://httpredir.debian.org/debian/ jessie/main libcurl3 amd64 7.38.0-4+deb8u2 [259 kB]\r\nGet:22 http://httpredir.debian.org/debian/ jessie/main curl amd64 7.38.0-4+deb8u2 [200 kB]\r\nGet:23 http://httpredir.debian.org/debian/ jessie/main ca-certificates all 20141019 [200 kB]\r\ndebconf: delaying package configuration, since apt-utils is not installed\r\nFetched 5121 kB in 16s (302 kB/s)\r\nSelecting previously unselected package libssl1.0.0:amd64.\r\n(Reading database ... 7531 files and directories currently installed.)\r\nPreparing to unpack .../libssl1.0.0_1.0.1k-3+deb8u1_amd64.deb ...\r\nUnpacking libssl1.0.0:amd64 (1.0.1k-3+deb8u1) ...\r\nSelecting previously unselected package libgmp10:amd64.\r\nPreparing to unpack .../libgmp10_2%3a6.0.0+dfsg-6_amd64.deb ...\r\nUnpacking libgmp10:amd64 (2:6.0.0+dfsg-6) ...\r\nSelecting previously unselected package libnettle4:amd64.\r\nPreparing to unpack .../libnettle4_2.7.1-5_amd64.deb ...\r\nUnpacking libnettle4:amd64 (2.7.1-5) ...\r\nSelecting previously unselected package libhogweed2:amd64.\r\nPreparing to unpack .../libhogweed2_2.7.1-5_amd64.deb ...\r\nUnpacking libhogweed2:amd64 (2.7.1-5) ...\r\nSelecting previously unselected package libffi6:amd64.\r\nPreparing to unpack .../libffi6_3.1-2+b2_amd64.deb ...\r\nUnpacking libffi6:amd64 (3.1-2+b2) ...\r\nSelecting previously unselected package libp11-kit0:amd64.\r\nPreparing to unpack .../libp11-kit0_0.20.7-1_amd64.deb ...\r\nUnpacking libp11-kit0:amd64 (0.20.7-1) ...\r\nSelecting previously unselected package libtasn1-6:amd64.\r\nPreparing to unpack .../libtasn1-6_4.2-3+deb8u1_amd64.deb ...\r\nUnpacking libtasn1-6:amd64 (4.2-3+deb8u1) ...\r\nSelecting previously unselected package libgnutls-deb0-28:amd64.\r\nPreparing to unpack .../libgnutls-deb0-28_3.3.8-6+deb8u3_amd64.deb ...\r\nUnpacking libgnutls-deb0-28:amd64 (3.3.8-6+deb8u3) ...\r\nSelecting previously unselected package libkeyutils1:amd64.\r\nPreparing to unpack .../libkeyutils1_1.5.9-5+b1_amd64.deb ...\r\nUnpacking libkeyutils1:amd64 (1.5.9-5+b1) ...\r\nSelecting previously unselected package libkrb5support0:amd64.\r\nPreparing to unpack .../libkrb5support0_1.12.1+dfsg-19+deb8u1_amd64.deb ...\r\nUnpacking libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSelecting previously unselected package libk5crypto3:amd64.\r\nPreparing to unpack .../libk5crypto3_1.12.1+dfsg-19+deb8u1_amd64.deb ...\r\nUnpacking libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSelecting previously unselected package libkrb5-3:amd64.\r\nPreparing to unpack .../libkrb5-3_1.12.1+dfsg-19+deb8u1_amd64.deb ...\r\nUnpacking libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSelecting previously unselected package libgssapi-krb5-2:amd64.\r\nPreparing to unpack .../libgssapi-krb5-2_1.12.1+dfsg-19+deb8u1_amd64.deb ...\r\nUnpacking libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSelecting previously unselected package libidn11:amd64.\r\nPreparing to unpack .../libidn11_1.29-1+b2_amd64.deb ...\r\nUnpacking libidn11:amd64 (1.29-1+b2) ...\r\nSelecting previously unselected package libsasl2-modules-db:amd64.\r\nPreparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-13+deb8u1_amd64.deb ...\r\nUnpacking libsasl2-modules-db:amd64 (2.1.26.dfsg1-13+deb8u1) ...\r\nSelecting previously unselected package libsasl2-2:amd64.\r\nPreparing to unpack .../libsasl2-2_2.1.26.dfsg1-13+deb8u1_amd64.deb ...\r\nUnpacking libsasl2-2:amd64 (2.1.26.dfsg1-13+deb8u1) ...\r\nSelecting previously unselected package libldap-2.4-2:amd64.\r\nPreparing to unpack .../libldap-2.4-2_2.4.40+dfsg-1+deb8u1_amd64.deb ...\r\nUnpacking libldap-2.4-2:amd64 (2.4.40+dfsg-1+deb8u1) ...\r\nSelecting previously unselected package librtmp1:amd64.\r\nPreparing to unpack .../librtmp1_2.4+20150115.gita107cef-1_amd64.deb ...\r\nUnpacking librtmp1:amd64 (2.4+20150115.gita107cef-1) ...\r\nSelecting previously unselected package libssh2-1:amd64.\r\nPreparing to unpack .../libssh2-1_1.4.3-4.1_amd64.deb ...\r\nUnpacking libssh2-1:amd64 (1.4.3-4.1) ...\r\nSelecting previously unselected package libcurl3:amd64.\r\nPreparing to unpack .../libcurl3_7.38.0-4+deb8u2_amd64.deb ...\r\nUnpacking libcurl3:amd64 (7.38.0-4+deb8u2) ...\r\nSelecting previously unselected package openssl.\r\nPreparing to unpack .../openssl_1.0.1k-3+deb8u1_amd64.deb ...\r\nUnpacking openssl (1.0.1k-3+deb8u1) ...\r\nSelecting previously unselected package ca-certificates.\r\nPreparing to unpack .../ca-certificates_20141019_all.deb ...\r\nUnpacking ca-certificates (20141019) ...\r\nSelecting previously unselected package curl.\r\nPreparing to unpack .../curl_7.38.0-4+deb8u2_amd64.deb ...\r\nUnpacking curl (7.38.0-4+deb8u2) ...\r\nSetting up libssl1.0.0:amd64 (1.0.1k-3+deb8u1) ...\r\ndebconf: unable to initialize frontend: Dialog\r\ndebconf: (TERM is not set, so the dialog frontend is not usable.)\r\ndebconf: falling back to frontend: Readline\r\ndebconf: unable to initialize frontend: Readline\r\ndebconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)\r\ndebconf: falling back to frontend: Teletype\r\nSetting up libgmp10:amd64 (2:6.0.0+dfsg-6) ...\r\nSetting up libnettle4:amd64 (2.7.1-5) ...\r\nSetting up libhogweed2:amd64 (2.7.1-5) ...\r\nSetting up libffi6:amd64 (3.1-2+b2) ...\r\nSetting up libp11-kit0:amd64 (0.20.7-1) ...\r\nSetting up libtasn1-6:amd64 (4.2-3+deb8u1) ...\r\nSetting up libgnutls-deb0-28:amd64 (3.3.8-6+deb8u3) ...\r\nSetting up libkeyutils1:amd64 (1.5.9-5+b1) ...\r\nSetting up libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSetting up libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSetting up libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSetting up libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u1) ...\r\nSetting up libidn11:amd64 (1.29-1+b2) ...\r\nSetting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-13+deb8u1) ...\r\nSetting up libsasl2-2:amd64 (2.1.26.dfsg1-13+deb8u1) ...\r\nSetting up libldap-2.4-2:amd64 (2.4.40+dfsg-1+deb8u1) ...\r\nSetting up librtmp1:amd64 (2.4+20150115.gita107cef-1) ...\r\nSetting up libssh2-1:amd64 (1.4.3-4.1) ...\r\nSetting up libcurl3:amd64 (7.38.0-4+deb8u2) ...\r\nSetting up openssl (1.0.1k-3+deb8u1) ...\r\nSetting up ca-certificates (20141019) ...\r\ndebconf: unable to initialize frontend: Dialog\r\ndebconf: (TERM is not set, so the dialog frontend is not usable.)\r\ndebconf: falling back to frontend: Readline\r\ndebconf: unable to initialize frontend: Readline\r\ndebconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)\r\ndebconf: falling back to frontend: Teletype\r\nSetting up curl (7.38.0-4+deb8u2) ...\r\nProcessing triggers for libc-bin (2.19-18+deb8u1) ...\r\nProcessing triggers for ca-certificates (20141019) ...\r\nUpdating certificates in /etc/ssl/certs... 173 added, 0 removed; done.\r\nRunning hooks in /etc/ca-certificates/update.d....done.\r\nrm: cannot remove '/var/lib/apt/lists/partial': Operation not permitted\r\nThe command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends    ca-certificates    curl    && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1\r\n```\r\n\r\nExpected Results:\r\n\r\nThe `Dockerfile` is being built successfully (and it is indeed w/o userns)\r\n\r\nAdditional info:\r\n\r\njust disabling userns in the daemon solves this issue, ping @estesp "},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/163677641","html_url":"https://github.com/docker/docker/issues/18151#issuecomment-163677641","issue_url":"https://api.github.com/repos/docker/docker/issues/18151","id":163677641,"user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T16:26:10Z","updated_at":"2015-12-10T16:26:10Z","body":"I'm not sure if it should be possible to mount it in userns. Just mount it outside - it should be same."}}