-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apk update/add in the docker container under proxy giving permission denied #191
Comments
Got something similar with the python:2.7-alpine image :
Give me :
|
Got something similar with the nginx:alpine image :
Error Result :
|
I tried this and saw that, it is just the |
I am seeing the same thing, permission denied. Is there any solution or workaround for this? |
can you try running |
@ncopa |
@kiranpradeep |
It seems that apk uses libfetch, which accepts HTTP_PROXY_AUTH environment variable. I could workaround this issue as following:
Please note that upper case letters must be used for HTTP_PROXY_AUTH . |
Come back to that issue. The work around doens't work when no authentication is requried at proxy side. I m running over docker 1.12.1 (I see docker info | grep Security => seccomp). Running strace fails with also Operation not permitted. I still get the sequences : |
docker run -v /apk/addons:/custo --security-opt seccomp:unconfined --cap-add SYS_PTRACE -e http_proxy=http://proxyhost:proxyport -e https_proxy=http://proxyhost:proxyport -it alpine:3.3 sh |
Closing as it sounds like the workaround here is to set |
I have same problem with plain vanilla alpine on
I have no proxy. What should I do ? I can't install
It's happening only on AWS EC2 instance. Here is export output
|
@unoexperto you've probably solved your issue by now but this may be useful to someone else. I had a similar issue also on EC2, running Docker 17.06.0-ce. To troubleshoot, I tried wget in my Dockerfile I then switched to HTTPS and tried However
However, while attempting to
So I added testing and community repositories like so
Everything worked happily after that. |
Hi all - I'm sure all involved have moved on, but in case someone else finds this - this might also help (in addition to what @omoloro mentioned above) I encountered this issue on our Google Cloud Compute instance running ubuntu 17.04. None of the fixes here helped, so I decided to see if the same thing happens on Centos 7 - and it worked on first try! We don't use any proxy server ourselves, but I imagine that running in a VM inside a cloud would mean that there's some kind of proxy along the path in their infrastructure. In any case, I'm assuming there's something in Ubuntu's configuration (not necessarily related to Docker) that [indirectly] causes this. |
Someone was able to use this image with https proxy? |
All in all problems should have been fix with specifying Except I ran into the situation where
This worked on the host system (ubuntu), but apk did not support this, and vice-versa. Problem was fixed by defining |
I don't understand. The "solutions" are not working for us. We still get permission denied, no matter what we try. |
After several attempts with several combinations, I found the magic solution : |
I've tried it and got the same solution. ng1
apk can't resolve the proxy host name without percent-encoding. ng2
Probably libfetch does not support percent-encoding. ok
docker build
|
@crts-xxx I managed to make it work doing as @AndolsiZied said :
|
Crazy I spent so much time on it... Thanks @crts-xxx .
@etlfg |
It appears that apk only honours the HTTP_PROXY variable and not http_proxy. So your environment variable has to be all caps. Same for HTTPS_PROXY. Do not use small case proxy environment variable here. |
I am using only an EC2 ..I dont have any proxy .. still I am facing same issue. |
Same issue without using a proxy! |
Then you have a different issue, since this was about the use of proxy. |
The issue is precisely the same, but the environmental circumstances are different. I'm getting the same error, but the solution is not feasible for my case. What to do? Open a new issue ticket which will be closed because everyone assumes it must be the proxy to which a solution was given here in this thread? Please instruct... |
Please create a new ticket, but without using the word proxy in the title. Then describe how to reproduce it. |
Setting environment variables and then running sudo is a bad idea. Commands under sudo have their own environment variables.
will not work. Solution:
|
sudo -E keeps your environment variables. |
same problem for golang image with
add in Dockerfile
worked |
Unfortunately this workaround can't be used if the proxy server does not accept any authentication credentials. In my environment, behind a coorporate firewall, I can't get it to work as I cannot use |
Still seeing this. For me it was also DNS related. I did not have the option of rebuilding the container however.
|
In my case I was able to avoid this error after disconnecting from my company's VPN |
This solution consistently doesn't work with special characters. |
RUN apk add ca-certificates --no-cache |
I've spent sooooo much time changing my image from a slim and gorgeous alpine to a bloated ubuntu based... |
@utrotzek you must use |
docker build --build-arg http_proxy="http://proxy:port" https_proxy="http://proxy:port" --tag my-image:x.y . !!! "http://proxy:port" !!!! |
|
Running docker in a host (centos Red Hat Enterprise Linux Server release 7.2 (Maipo)) which is under proxy, able to pull alpine:3.4 by following steps in stackoverflow.
Now starting the container form alpine:3.4, setting proxy, and running
apk --update add curl
giving me permission deniedThe text was updated successfully, but these errors were encountered: