{"action":"created","issue":{"url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/15","labels_url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/15/comments","events_url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/15/events","html_url":"https://github.com/gliderlabs/docker-alpine/issues/15","id":60376635,"number":15,"title":"`RUN apk ...` in a Dockerfile can succeed while failing to install packages","user":{"login":"squaremo","id":62033,"avatar_url":"https://avatars.githubusercontent.com/u/62033?v=3","gravatar_id":"","url":"https://api.github.com/users/squaremo","html_url":"https://github.com/squaremo","followers_url":"https://api.github.com/users/squaremo/followers","following_url":"https://api.github.com/users/squaremo/following{/other_user}","gists_url":"https://api.github.com/users/squaremo/gists{/gist_id}","starred_url":"https://api.github.com/users/squaremo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaremo/subscriptions","organizations_url":"https://api.github.com/users/squaremo/orgs","repos_url":"https://api.github.com/users/squaremo/repos","events_url":"https://api.github.com/users/squaremo/events{/privacy}","received_events_url":"https://api.github.com/users/squaremo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gliderlabs/docker-alpine/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/gliderlabs/docker-alpine/labels/upstream","name":"upstream","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-09T17:09:23Z","updated_at":"2015-04-28T09:45:03Z","closed_at":null,"body":"If I put the Dockerfile example from http://gliderlabs.viewdocs.io/docker-alpine/usage in a file and do `Docker build .`, it will often fail to install packages, but not fail (that step of) the build.\r\n\r\nHere's a transcript of this happening:\r\n\r\n```\r\n$ cat Dockerfile \r\nFROM gliderlabs/alpine:3.1\r\nRUN apk add --update \\\r\n    python \\\r\n    python-dev \\\r\n    py-pip \\\r\n    build-base \\\r\n  && pip install virtualenv \\\r\n  && rm -rf /var/cache/apk/*\r\n$ docker build .\r\nSending build context to Docker daemon 2.048 kB\r\nSending build context to Docker daemon \r\nStep 0 : FROM gliderlabs/alpine:3.1\r\n ---> c9fa955c112e\r\nStep 1 : RUN apk add --update     python     python-dev     py-pip     build-base   && pip install virtualenv   && rm -rf /var/cache/apk/*\r\n ---> Running in 8b06601a9ccd\r\nfetch http://dl-4.alpinelinux.org/alpine/v3.1/main/x86_64/APKINDEX.tar.gz\r\n(1/34) Installing libbz2 (1.0.6-r3)\r\n(2/34) Installing expat (2.1.0-r1)\r\n(3/34) Installing libffi (3.0.13-r0)\r\n(4/34) Installing gdbm (1.11-r0)\r\n(5/34) Installing ncurses-terminfo-base (5.9-r3)\r\n(6/34) Installing ncurses-libs (5.9-r3)\r\n(7/34) Installing readline (6.3-r3)\r\n(8/34) Installing sqlite-libs (3.8.7.4-r0)\r\n(9/34) Installing python (2.7.9-r0)\r\nERROR: python-2.7.9-r0: Resource temporarily unavailable\r\n(10/34) Installing python-doc (2.7.9-r0)\r\n(11/34) Installing python-tests (2.7.9-r0)\r\nERROR: python-tests-2.7.9-r0: Resource temporarily unavailable\r\n(12/34) Installing py-gdbm (2.7.9-r0)\r\n(13/34) Installing pkgconf (0.9.7-r0)\r\n(14/34) Installing pkgconfig (0.25-r1)\r\n(15/34) Installing python-dev (2.7.9-r0)\r\n(16/34) Installing py-setuptools (1.1.7-r0)\r\n(17/34) Installing py-pip (1.5.6-r2)\r\nERROR: py-pip-1.5.6-r2: Resource temporarily unavailable\r\n(18/34) Installing binutils-libs (2.24-r3)\r\n(19/34) Installing binutils (2.24-r3)\r\n(20/34) Installing libgomp (4.8.3-r0)\r\n(21/34) Installing gmp5 (5.1.3-r0)\r\nERROR: gmp5-5.1.3-r0: Resource temporarily unavailable\r\n(22/34) Installing mpfr3 (3.1.2-r0)\r\n(23/34) Installing mpc1 (1.0.1-r0)\r\nERROR: mpc1-1.0.1-r0: Resource temporarily unavailable\r\n(24/34) Installing gcc (4.8.3-r0)\r\nERROR: gcc-4.8.3-r0: Resource temporarily unavailable\r\n(25/34) Installing make (4.1-r0)\r\n(26/34) Installing patch (2.7.1-r1)\r\n(27/34) Installing musl-dbg (1.1.5-r2)\r\n(28/34) Installing musl-dev (1.1.5-r2)\r\n(29/34) Installing linux-headers (3.12.6-r1)\r\n(30/34) Installing libc-dev (0.6-r0)\r\n(31/34) Installing libgcc (4.8.3-r0)\r\nERROR: libgcc-4.8.3-r0: Resource temporarily unavailable\r\n(32/34) Installing libstdc++ (4.8.3-r0)\r\nERROR: libstdc++-4.8.3-r0: Resource temporarily unavailable\r\n(33/34) Installing g++ (4.8.3-r0)\r\n(34/34) Installing build-base (0.3-r0)\r\nExecuting busybox-1.22.1-r14.trigger\r\n8 errors; 87 MiB in 41 packages\r\n/bin/sh: pip: not found\r\n```\r\n\r\nEdit: I'm running docker 1.5 in a VirtualBox VM with Ubuntu 14.04."},"comment":{"url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/comments/96991342","html_url":"https://github.com/gliderlabs/docker-alpine/issues/15#issuecomment-96991342","issue_url":"https://api.github.com/repos/gliderlabs/docker-alpine/issues/15","id":96991342,"user":{"login":"chriswessels","id":2657600,"avatar_url":"https://avatars.githubusercontent.com/u/2657600?v=3","gravatar_id":"","url":"https://api.github.com/users/chriswessels","html_url":"https://github.com/chriswessels","followers_url":"https://api.github.com/users/chriswessels/followers","following_url":"https://api.github.com/users/chriswessels/following{/other_user}","gists_url":"https://api.github.com/users/chriswessels/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswessels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswessels/subscriptions","organizations_url":"https://api.github.com/users/chriswessels/orgs","repos_url":"https://api.github.com/users/chriswessels/repos","events_url":"https://api.github.com/users/chriswessels/events{/privacy}","received_events_url":"https://api.github.com/users/chriswessels/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T09:45:03Z","updated_at":"2015-04-28T09:45:03Z","body":"I'm having the same problem. It's good that this has been fixed upstream (apk add emitting a failure code), but it's still not great to be pulling from a flaky mirror. Is there a way to switch the the pull location to http://nl.alpinelinux.org?\r\n\r\n@andyshinn the apk link you reference is 404ing."}}