🎣 Open-Source Phishing Toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

  1. # Minify client side assets (JavaScript)
  2. FROM node:latest AS build-js
  3. RUN npm install gulp gulp-cli -g
  4. WORKDIR /build
  5. COPY . .
  6. RUN npm install --only=dev
  7. RUN gulp
  8. # Build Golang binary
  9. FROM golang:1.15.2 AS build-golang
  10. WORKDIR /go/src/github.com/gophish/gophish
  11. COPY . .
  12. RUN go get -v && go build -v
  13. # Runtime container
  14. FROM debian:stable-slim
  15. RUN useradd -m -d /opt/gophish -s /bin/bash app
  16. RUN apt-get update && \
  17. apt-get install --no-install-recommends -y jq libcap2-bin && \
  18. apt-get clean && \
  19. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  20. WORKDIR /opt/gophish
  21. COPY --from=build-golang /go/src/github.com/gophish/gophish/ ./
  22. COPY --from=build-js /build/static/js/dist/ ./static/js/dist/
  23. COPY --from=build-js /build/static/css/dist/ ./static/css/dist/
  24. COPY --from=build-golang /go/src/github.com/gophish/gophish/config.json ./
  25. RUN chown app. config.json
  26. RUN setcap 'cap_net_bind_service=+ep' /opt/gophish/gophish
  27. USER app
  28. RUN sed -i 's/127.0.0.1/0.0.0.0/g' config.json
  29. RUN touch config.json.tmp
  30. EXPOSE 3333 8080 8443 80
  31. CMD ["./docker/run.sh"]