Skip to content

caddy-builder broken on hosts where setcap is not supported #290

@ptxmac

Description

@ptxmac

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 supported

So when trying to use the caddy:2.5.4-builder image docker fails with:

2023/04/11 21:32:04 [INFO] Setting capabilities (requires admin privileges): [setcap cap_net_bind_service=+ep ./caddy]
Failed to set capabilities on file './caddy': Not supported
2023/04/11 21:32:04 [ERROR] failed to setcap on the binary: exit status 1
The command '/bin/sh -c xcaddy build' returned a non-zero code: 1

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/_/caddy

Even better if support for setcap could be auto-detected, but I have no knowledge about that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions