From 7cf715281afc8621eb603621b703cdae4ec34327 Mon Sep 17 00:00:00 2001 From: Jas Date: Thu, 17 Sep 2020 19:50:14 +0800 Subject: [PATCH 1/3] Update tmplv1.Dockerfile add libcap to v1 , to support setcap net_bind_service --- alpine/tmplv1.Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alpine/tmplv1.Dockerfile b/alpine/tmplv1.Dockerfile index e04dd39..671281d 100644 --- a/alpine/tmplv1.Dockerfile +++ b/alpine/tmplv1.Dockerfile @@ -1,5 +1,5 @@ FROM alpine:$ALPINE_VERSION -RUN apk --no-cache add ca-certificates tzdata +RUN apk --no-cache add ca-certificates tzdata libcap RUN set -ex; \ apkArch="$(apk --print-arch)"; \ case "$apkArch" in \ @@ -9,7 +9,9 @@ RUN set -ex; \ *) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \ esac; \ wget --quiet -O /usr/local/bin/traefik "https://github.com/containous/traefik/releases/download/$VERSION/traefik_linux-$arch"; \ - chmod +x /usr/local/bin/traefik + chmod +x /usr/local/bin/traefik; \ + setcap 'cap_net_bind_service=+ep' /usr/local/bin/traefik + COPY entrypoint.sh / EXPOSE 80 ENTRYPOINT ["/entrypoint.sh"] From 92060dc612b139bb2b8392dec1d12d4c733f09a0 Mon Sep 17 00:00:00 2001 From: Jas Date: Thu, 17 Sep 2020 19:51:39 +0800 Subject: [PATCH 2/3] Update tmplv2.Dockerfile add libcap to v2 , to support setcap net_bind_service --- alpine/tmplv2.Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alpine/tmplv2.Dockerfile b/alpine/tmplv2.Dockerfile index 83ff9a9..28bca3d 100644 --- a/alpine/tmplv2.Dockerfile +++ b/alpine/tmplv2.Dockerfile @@ -1,5 +1,5 @@ FROM alpine:$ALPINE_VERSION -RUN apk --no-cache add ca-certificates tzdata +RUN apk --no-cache add ca-certificates tzdata libcap RUN set -ex; \ apkArch="$(apk --print-arch)"; \ case "$apkArch" in \ @@ -11,7 +11,9 @@ RUN set -ex; \ wget --quiet -O /tmp/traefik.tar.gz "https://github.com/containous/traefik/releases/download/${VERSION}/traefik_${VERSION}_linux_$arch.tar.gz"; \ tar xzvf /tmp/traefik.tar.gz -C /usr/local/bin traefik; \ rm -f /tmp/traefik.tar.gz; \ - chmod +x /usr/local/bin/traefik + chmod +x /usr/local/bin/traefik; \ + setcap 'cap_net_bind_service=+ep' /usr/local/bin/traefik + COPY entrypoint.sh / EXPOSE 80 ENTRYPOINT ["/entrypoint.sh"] From f2d5602f92985f76af40155c0d8f268cec742d12 Mon Sep 17 00:00:00 2001 From: Jas Date: Thu, 17 Sep 2020 19:53:15 +0800 Subject: [PATCH 3/3] Update Dockerfile update dockerfile to support set cap net_bind_service --- alpine/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 8eca484..f67ce94 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:3.11 -RUN apk --no-cache add ca-certificates tzdata +RUN apk --no-cache add ca-certificates tzdata libcap RUN set -ex; \ apkArch="$(apk --print-arch)"; \ case "$apkArch" in \ @@ -11,7 +11,9 @@ RUN set -ex; \ wget --quiet -O /tmp/traefik.tar.gz "https://github.com/containous/traefik/releases/download/v2.3.0-rc5/traefik_v2.3.0-rc5_linux_$arch.tar.gz"; \ tar xzvf /tmp/traefik.tar.gz -C /usr/local/bin traefik; \ rm -f /tmp/traefik.tar.gz; \ - chmod +x /usr/local/bin/traefik + chmod +x /usr/local/bin/traefik; \ + setcap 'cap_net_bind_service=+ep' /usr/local/bin/traefik + COPY entrypoint.sh / EXPOSE 80 ENTRYPOINT ["/entrypoint.sh"]