Dockerfile 853 B

1234567891011121314151617181920212223242526
  1. # build stage
  2. FROM golang:1.16-alpine3.15 AS build-env
  3. ENV SRC_DIR $GOPATH/src/github.com/bettercap/bettercap
  4. RUN apk add --no-cache ca-certificates
  5. RUN apk add --no-cache bash iptables wireless-tools build-base libpcap-dev libusb-dev linux-headers libnetfilter_queue-dev git
  6. WORKDIR $SRC_DIR
  7. ADD . $SRC_DIR
  8. RUN make
  9. # get caplets
  10. RUN mkdir -p /usr/local/share/bettercap
  11. RUN git clone https://github.com/bettercap/caplets /usr/local/share/bettercap/caplets
  12. # final stage
  13. FROM alpine:3.15
  14. RUN apk add --no-cache ca-certificates
  15. RUN apk add --no-cache bash iproute2 libpcap libusb-dev libnetfilter_queue wireless-tools
  16. COPY --from=build-env /go/src/github.com/bettercap/bettercap/bettercap /app/
  17. COPY --from=build-env /usr/local/share/bettercap/caplets /app/
  18. WORKDIR /app
  19. EXPOSE 80 443 53 5300 8080 8081 8082 8083 8000
  20. ENTRYPOINT ["/app/bettercap"]