0

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?

1

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.

0

For some reason I had to run this command in the Ubuntu host:

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Then it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.