apk tool gives permission denied












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?










share|improve this question





























    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?










    share|improve this question



























      0












      0








      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?










      share|improve this question
















      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?







      virtual-machine docker alpine-linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 26 '18 at 6:21







      Niklas Rosencrantz

















      asked Oct 26 '18 at 6:11









      Niklas RosencrantzNiklas Rosencrantz

      1,07331437




      1,07331437






















          2 Answers
          2






          active

          oldest

          votes


















          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.






          share|improve this answer

































            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.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477894%2fapk-tool-gives-permission-denied%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              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.






              share|improve this answer






























                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.






                share|improve this answer




























                  1












                  1








                  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.






                  share|improve this answer















                  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.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 16 at 5:37

























                  answered Jan 16 at 5:27









                  rojroj

                  1112




                  1112

























                      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.






                      share|improve this answer




























                        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.






                        share|improve this answer


























                          0












                          0








                          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.






                          share|improve this answer













                          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.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 26 '18 at 7:11









                          Niklas RosencrantzNiklas Rosencrantz

                          1,07331437




                          1,07331437






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477894%2fapk-tool-gives-permission-denied%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                              is 'sed' thread safe

                              How to make a Squid Proxy server?