Skip to content

Commit

Permalink
Updated the Dockerfile to allow the gophish binary to bind to privile…
Browse files Browse the repository at this point in the history
…ged ports. Fixes gophish#1660.
  • Loading branch information
jordan-wright committed Nov 24, 2019
1 parent 1aab1a3 commit c2f579a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand All @@ -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
Expand Down

0 comments on commit c2f579a

Please sign in to comment.