-
Notifications
You must be signed in to change notification settings - Fork 77
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
caddy-builder broken on hosts where setcap is not supported #290
Comments
😬 I didn't even know that could fail if the command existed. That's annoying. I know nothing about Synology. Would you be able to find out why it doesn't work? I have no idea how to determine if Anyways, instructions for I think using |
I think it's because synology still use aufs as the storage driver, and from what I can find setcap isn't supported on aufs: moby/moby#5650 |
Is this a build-only error? i.e. could you build the image elsewhere and pull it onto the NAS? |
Hmm, that might work, though it doesn't fit well in my current setup to have this built in a different host. |
Ok, thanks for the feedback! |
This might be also problematic for running official images on services with more restrictive permissions, that doesn't allow I struggled with deploying Caddy on Render.com (
|
@dmgawel this was covered here: containerd/nerdctl#2439 (comment)
Personally I don't have much issue with the container running a process as root. For those that are more security conscious about such they should be using rootless containers which maps the internal container root UID to a non-root UID on the system. Main perk of non-root in the container is all capabilities are stripped and in the event that the container had mount access to important content on the host filesystem owned by root, it'd be prevented from writing. |
I'm running docker on my Synology NAS.
Synology have their own variant of linux, and they provide the docker installation which is a bit... wonky.
Among other things,
setcap
is not supportedSo when trying to use the
caddy:2.5.4-builder
image docker fails with:Adding
ENV XCADDY_SETCAP 0
to my Dockerfile solves the problem, but I had to look through commits and source code to discover that. It would be helpful if it was mentioned on https://hub.docker.com/_/caddyEven better if support for
setcap
could be auto-detected, but I have no knowledge about thatThe text was updated successfully, but these errors were encountered: