Skip to content

Commit

Permalink
Use XCADDY_SETCAP environment variable to set cap_net_bind_service on…
Browse files Browse the repository at this point in the history
… output caddy binary when building
  • Loading branch information
abjugard committed Feb 7, 2023
1 parent 35f4dc6 commit 30c363c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2.6/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ENV XCADDY_VERSION v0.3.2
ENV CADDY_VERSION v2.6.2
# Configures xcaddy to not clean up post-build (unnecessary in a container)
ENV XCADDY_SKIP_CLEANUP 1
# Sets capabilities for output caddy binary to be able to bind to privileged ports
ENV XCADDY_SETCAP 1

RUN set -eux; \
apkArch="$(apk --print-arch)"; \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.builder.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ENV XCADDY_VERSION v{{ .xcaddy_config.version }}
ENV CADDY_VERSION v{{ .config.caddy_version }}
# Configures xcaddy to not clean up post-build (unnecessary in a container)
ENV XCADDY_SKIP_CLEANUP 1
# Sets capabilities for output caddy binary to be able to bind to privileged ports
ENV XCADDY_SETCAP 1

RUN set -eux; \
apkArch="$(apk --print-arch)"; \
Expand Down

0 comments on commit 30c363c

Please sign in to comment.