{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18038","labels_url":"https://api.github.com/repos/docker/docker/issues/18038/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18038/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18038/events","html_url":"https://github.com/docker/docker/issues/18038","id":117324108,"number":18038,"title":"Can't create directory under /usr/local","user":{"login":"shyamsalimkumar","id":1527732,"avatar_url":"https://avatars.githubusercontent.com/u/1527732?v=3","gravatar_id":"","url":"https://api.github.com/users/shyamsalimkumar","html_url":"https://github.com/shyamsalimkumar","followers_url":"https://api.github.com/users/shyamsalimkumar/followers","following_url":"https://api.github.com/users/shyamsalimkumar/following{/other_user}","gists_url":"https://api.github.com/users/shyamsalimkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/shyamsalimkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyamsalimkumar/subscriptions","organizations_url":"https://api.github.com/users/shyamsalimkumar/orgs","repos_url":"https://api.github.com/users/shyamsalimkumar/repos","events_url":"https://api.github.com/users/shyamsalimkumar/events{/privacy}","received_events_url":"https://api.github.com/users/shyamsalimkumar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-17T10:21:11Z","updated_at":"2015-11-17T14:30:50Z","closed_at":"2015-11-17T14:30:50Z","body":"Description:\r\nI am building an image (located [here](https://github.com/shyamsalimkumar/docker-intellij/blob/master/Dockerfile.intellij-w-golang)) off of another docker image but I'm unable to extract a tar file into /usr/local/go.\r\nEven when I ran \r\n```\r\nRUN echo 'Installing Golang' && \\\r\n    mkdir -p /usr/local/go\r\n```\r\nI got\r\n\r\n```\r\nmkdir: cannot create directory '/usr/local/go': Permission denied\r\nINFO[0000] The command [/bin/sh -c echo 'Installing Golang' &&     mkdir -p /usr/local/go] returned a non-zero code: 1\r\n```\r\n`docker version`: \r\n```\r\nClient version: 1.6.2\r\nClient API version: 1.18\r\nGo version (client): go1.2.1\r\nGit commit (client): 7c8fca2\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.6.2\r\nServer API version: 1.18\r\nGo version (server): go1.2.1\r\nGit commit (server): 7c8fca2\r\nOS/Arch (server): linux/amd64\r\n```\r\n`docker info`:\r\n```\r\nContainers: 15\r\nImages: 40\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 70\r\n Dirperm1 Supported: false\r\nExecution Driver: native-0.2\r\nKernel Version: 3.13.0-65-generic\r\nOperating System: Ubuntu 14.04.3 LTS\r\nCPUs: 4\r\nTotal Memory: 7.689 GiB\r\nName: shyam-system\r\nWARNING: No swap limit support\r\n```\r\n\r\n`uname -a`: `Linux shyam-system 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux`\r\n\r\nEnvironment details: Physical Ubuntu 14.04 machine\r\n\r\nHow reproducible: I've run [build](https://github.com/shyamsalimkumar/docker-intellij/blob/master/build) and it always comes, so 100%?\r\n\r\nSteps to Reproduce:\r\nRun [build](https://github.com/shyamsalimkumar/docker-intellij/blob/master/build)\r\n\r\nActual Results:\r\n I got the following error message\r\n```\r\n ---> Using cache\r\n ---> 3b55732ba543\r\nStep 2 : RUN echo 'Installing Golang' &&     mkdir -p /usr/local/go &&     tar -xf /tmp/golang.tar.gz -C /usr/local/go &&     rm -rf /tmp/*\r\n ---> Running in 56062d8d66b5\r\nInstalling Golang\r\nmkdir: cannot create directory '/usr/local/go': Permission denied\r\nINFO[0000] The command [/bin/sh -c echo 'Installing Golang' &&     mkdir -p /usr/local/go &&     tar -xf /tmp/golang.tar.gz -C /usr/local/go &&     rm -rf /tmp/*] returned a non-zero code: 1 \r\nSending build context to Docker daemon 92.16 kB\r\nSending build context to Docker daemon \r\nStep 0 : FROM shyamsalimkumar/intellij-idea:v15.0.1\r\n ---> 23e16911b5f8\r\nStep 1 : RUN sed 's/main$/main universe/' -i /etc/apt/sources.list &&     apt-get update && apt-get install -y software-properties-common &&     add-apt-repository ppa:webupd8team/java -y &&     apt-get update &&     echo         oracle-java6-installer         oracle-java7-installer         shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections &&     apt-get install -y         oracle-java6-installer         oracle-java7-installer         libxext-dev libxrender-dev libxtst-dev &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* &&     rm -rf /tmp/*\r\n ---> Running in 0ccfd499c469\r\nsed: couldn't open temporary file /etc/apt/seddTsFxh: Permission denied\r\nINFO[0000] The command [/bin/sh -c sed 's/main$/main universe/' -i /etc/apt/sources.list &&     apt-get update && apt-get install -y software-properties-common &&     add-apt-repository ppa:webupd8team/java -y &&     apt-get update &&     echo         oracle-java6-installer         oracle-java7-installer         shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections &&     apt-get install -y         oracle-java6-installer         oracle-java7-installer         libxext-dev libxrender-dev libxtst-dev &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* &&     rm -rf /tmp/*] returned a non-zero code: 4\r\n```\r\nI presume the second error is due to the first, so please ignore that. The above is the partial output of running [build](https://github.com/shyamsalimkumar/docker-intellij/blob/master/build), which is \r\n```\r\necho 'This will take a lot of time...'\r\ndocker build -t shyamsalimkumar/intellij-idea:v15.0.1 -f Dockerfile.intellij .\r\ndocker build -t shyamsalimkumar/intellij-idea:v15.0.1-w-golang -f Dockerfile.intellij-w-golang .\r\ndocker build -t shyamsalimkumar/intellij-idea:v15.0.1-w-java6n7-scala -f Dockerfile.intellij-w-java6n7-scala .\r\n```"}}