title: Why can't I install py-setuptools as root in an Alpine 3.9 Docker container
body: <p><strong>The issue is our corporate firewall</strong></p>
  
  <hr>
  
  <p>Origional question:</p>
  
  <p>When attempting to install <code>py2-pip</code> or <code>py3-pip</code> in Alpine (Docker), it fails when installing <code>py-setuptools</code> with a "Permission denied" error.</p>
  
  <p>I am running this as root.</p>
  
  <pre><code>/ # apk add -v py2-pip
  (1/1) Installing py-setuptools (40.6.3-r0)
  ERROR: py-setuptools-40.6.3-r0: Permission denied
  1 error; 42 packages, 313 dirs, 8008 files, 194 MiB
  </code></pre>
  
  <p>This can be reproduced directly:</p>
  
  <p><code>docker run -ti alpine sh -c 'apk update &amp;&amp; apk add py2-pip'</code></p>
  
  <pre><code>docker run -ti alpine sh -c 'apk update &amp;&amp; apk add py2-pip'
  fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
  fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
  v3.9.2-47-ge6bacb23e0 [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]
  v3.9.2-46-g5f44785996 [http://dl-cdn.alpinelinux.org/alpine/v3.9/community]
  OK: 9758 distinct packages available
  (1/12) Installing libbz2 (1.0.6-r6)
  (2/12) Installing expat (2.2.6-r0)
  (3/12) Installing libffi (3.2.1-r6)
  (4/12) Installing gdbm (1.13-r1)
  (5/12) Installing ncurses-terminfo-base (6.1_p20190105-r0)
  (6/12) Installing ncurses-terminfo (6.1_p20190105-r0)
  (7/12) Installing ncurses-libs (6.1_p20190105-r0)
  (8/12) Installing readline (7.0.003-r1)
  (9/12) Installing sqlite-libs (3.26.0-r3)
  (10/12) Installing python2 (2.7.15-r3)
  (11/12) Installing py-setuptools (40.6.3-r0)
  ERROR: py-setuptools-40.6.3-r0: Permission denied
  (12/12) Installing py2-pip (18.1-r0)
  Executing busybox-1.29.3-r10.trigger
  1 error; 62 MiB in 25 packages
  </code></pre>
  
  <p>Seems like it's trying to get to a web resource that returns 403:</p>
  
  <pre><code>sendto(7, "GET /alpine/v3.9/main/x86_64/py-"..., 67, MSG_NOSIGNAL, NULL, 0) = 67
  sendto(7, "Host: dl-cdn.alpinelinux.org\r\n", 30, MSG_NOSIGNAL, NULL, 0) = 30
  sendto(7, "User-Agent: libfetch/2.0\r\n", 26, MSG_NOSIGNAL, NULL, 0) = 26
  sendto(7, "\r\n", 2, MSG_NOSIGNAL, NULL, 0) = 2
  setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
  read(7, "HTTP/1.1 403 Forbidden\r\nDate: Th"..., 1024) = 1024
  close(7)                                = 0
  wr) = 6
  writev(2, [{iov_base="", iov_len=0}, {iov_base="ERROR: ", iov_len=7}], 2ERROR: ) = 7
  writev(2, [{iov_base="py-setuptools-40.6.3-r0: Permiss"..., iov_len=42}, {iov_base=NULL, iov_len=0}], 2py
  -setuptools-40.6.3-r0: Permission denied) = 42
  </code></pre>