apk tool gives permission denied
7,864
I was getting the same symptoms until I followed the steps in Docker network config.
vi ~/.docker/config.json
- Add a
proxies
json section updated with your details:, "proxies": { "default": { "httpProxy": "http://your-proxy-host:your-proxy-port", "noProxy": "*.test.example.com,.example2.com" } }
Make sure you include the protocol (http://) in the httpProxy
setting, i.e.:
- "httpProxy": "*http://*your-proxy-host..."
not
- "httpProxy": "your-proxy-host..."
Once I did this, my Permission denied
errors disappeared and the fetches were successful.
Author by
Niklas Rosencrantz
Updated on September 18, 2022Comments
-
Niklas Rosencrantz over 1 year
I get this error message running alpine linux in a docker container hosted by Ubuntu 18.04 in Vagrant with its host in turn being Windows 10 behind a proxy. I have set the proxy variables but still get the same error.
/ # apk update fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: Permission denied WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/community: Permission denied WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory 2 errors; 13 distinct packages available / #
What can I do?