Skip to content

Commit

Permalink
fix sniproxy permission for non-root usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Seji64 committed Mar 20, 2024
1 parent 9aa2035 commit dbf7e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN echo "I'm building for $TARGETPLATFORM"
RUN apk update && apk upgrade

# Install needed packages and clean up
RUN apk add --no-cache tini dnsdist curl bash gnupg procps ca-certificates openssl dog lua5.4-filesystem ipcalc && rm -rf /var/cache/apk/*
RUN apk add --no-cache tini dnsdist curl bash gnupg procps ca-certificates openssl dog lua5.4-filesystem ipcalc libcap && rm -rf /var/cache/apk/*

# Setup Folder(s)
RUN mkdir -p /etc/dnsdist/conf.d && \
Expand All @@ -49,7 +49,7 @@ RUN ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \
*) echo "" ;; esac) \
&& echo "ARCH=$ARCH" \
&& curl -sSL https://github.com/mosajjal/sniproxy/releases/download/v2.0.4/sniproxy-v2.0.4-linux-${ARCH}.tar.gz | tar xvz \
&& chmod +x sniproxy && install sniproxy /usr/local/bin && rm sniproxy
&& chmod +x sniproxy && install sniproxy /usr/local/bin && setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/sniproxy && rm sniproxy

# Copy Files
COPY configs/dnsdist/dnsdist.conf.template /etc/dnsdist/dnsdist.conf.template
Expand Down

0 comments on commit dbf7e53

Please sign in to comment.