From c2f579a2c518ce028a80a8dce3d9ee22580396bd Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Sat, 23 Nov 2019 21:28:28 -0600 Subject: [PATCH] Updated the Dockerfile to allow the gophish binary to bind to privileged ports. Fixes #1660. --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 36f12874..f196e216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ FROM debian:stable-slim RUN useradd -m -d /opt/gophish -s /bin/bash app RUN apt-get update && \ - apt-get install --no-install-recommends -y jq && \ + apt-get install --no-install-recommends -y jq libcap2-bin && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* @@ -34,6 +34,8 @@ COPY --from=build-js /build/static/css/dist/ ./static/css/dist/ COPY --from=build-golang /go/src/github.com/gophish/gophish/config.json ./ RUN chown app. config.json +RUN setcap 'cap_net_bind_service=+ep' /opt/gophish/gophish + USER app RUN sed -i 's/127.0.0.1/0.0.0.0/g' config.json RUN touch config.json.tmp