-
Notifications
You must be signed in to change notification settings - Fork 35
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
Permission denied on port 80 #55
Comments
hum, indeed, looks like naming ports isn't enough. I need to investigate a bit on this, as I was convinced naming the port would override it. Thanks for the report, I'll look into it |
Hi, So, I'm still at a loss about why you can't use privileged ports and I can, but yeah, we need to do something about this. I'm very reluctant changing the default ports as this will break a lot of setups. However, we can introduce Since the next release is getting close (September 15th), that will go into that one, to avoid any surprises. Objections? |
Hi, Yes, go for the environment variables, in a follow-up issue? to keep this one open until it is found why there is this privilege problem. Even without permission problem, being able to control the ports with environment variables will be useful for other cases I think. |
@gquintard can you let us know how you are starting it? varnish:6.3 - works
varnish:7.1.1 - doesn't work
|
@alexfd, I'm just pulling to make sure I have the latest image, then run:
and explicitly using the
|
so weird, copy pasted from above:
I wonder if this is a docker version related thing. |
could be, what's your version? I'm on |
yes, it is a version thing. |
Great news! Thanks for looking into it.
I'll make the change to override the two default ports so that this can be
worked around, but at least we know what's going on.
Cheers!
…On Tue, Sep 6, 2022, 05:20 alexfd ***@***.***> wrote:
yes, it is a version thing.
I'm on 19.03.6 and it doesn't work. Updated to 20.10.17 and it works.
Problem is this doesn't want to run on AWS EKS, admittedly one version
behind the latest, so I'll try updating that too.
—
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA42AKLKOLLY7HA44Y4DYTDV44ZI7ANCNFSM57ANTNZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I don't understand the rationale for the change from #42 (9bbe2f3), but after struggling with this (and before finding this issue), I tried adding the last line here: FROM varnish:7.1.1-alpine
COPY default.vcl /etc/varnish/
USER root With this change, everything is working again for me (after upgrading from 7.0.0). I don't know if this is the "right" solution but I mention it here in case it helps anyone. I am running on AWS ECS. |
@galenhuntington, usually containers try to run as an unprivileged users to reduce security risk, but at the same time, since Varnish is a server, it makes sense for it to listen to port 80. On old Hope that helps |
Sure, thanks for clarifying. As of now, ECS containers still require root, so upgrading the Docker image from 7.0.0 caused me unexpected breakage (unexpected based on Varnish release notes). Perhaps this pitfall could be documented here. For ECS, there's an open issue, yet unacknowledged by AWS: aws/containers-roadmap#1721 |
yes, I'll add a line in the dockerhub docs once we have the default port override (probably next week or the one after, right after the next Varnish version is out) |
doc PR in flight: docker-library/docs#2229 |
* cleanups * corrected duplicate container name * added sensible default ports * setting default varnish memory size * added sample .env file * running behind proxy-server * changed default container listen port to 8080. See varnish/docker-varnish#55 * fixed port hitch
docs are online, closing |
Hi, Sorry for my lack of response. Thanks to have moved this forward! |
:/ also had this problem right now with Kubernetes 1.24 -> it is using ContainerD that is no longer allowing ports <1000 for unprivileged users! containerd/containerd#2516 |
@wodka , doesn't the port override solve your issue? |
it does, sry for not stating that. Just wanted to drop it as a reference when searching for the failure here. |
Ah, all good then! |
Hello,
This is a follow-up of #42 .
The command
docker run -it --rm -u varnish varnish -a http=:8080,HTTP -n /tmp/varnish_workdir
from comment #42 (comment) is not working.Still getting:
In my Docker compose file, I tried to override the default command providing options, to not have to override the entrypoint entirely:
But it does not override
-a http=:80,HTTP \
of the default entrypoint.As a workaround I will add:
in my Docker compose.
But I think a long term solution would be to change default port as initally requested in the referenced issue. Or to put HTTP and PROXY ports inside environment variables to easily be overridden.
Thanks for the reply.
The text was updated successfully, but these errors were encountered: