mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
simplified Dockerfile and improved build process
This commit is contained in:
parent
00e6c3dc84
commit
3b22341e34
3 changed files with 22934 additions and 22934 deletions
|
@ -1,20 +1,21 @@
|
|||
# build stage
|
||||
FROM golang:1.10-alpine AS build-env
|
||||
ENV GOPATH=/gocode
|
||||
ENV SRC_DIR=/gocode/src/github.com/bettercap/bettercap
|
||||
|
||||
ENV SRC_DIR $GOPATH/src/github.com/bettercap/bettercap
|
||||
|
||||
RUN apk add --update ca-certificates
|
||||
RUN apk add --no-cache --update bash iptables wireless-tools build-base libpcap-dev linux-headers libnetfilter_queue-dev git python py-six
|
||||
RUN apk add --no-cache --update bash iptables wireless-tools build-base libpcap-dev linux-headers libnetfilter_queue-dev git
|
||||
|
||||
WORKDIR $SRC_DIR
|
||||
ADD . $SRC_DIR
|
||||
RUN go get -u github.com/golang/dep/...
|
||||
RUN make deps
|
||||
RUN make
|
||||
|
||||
# final stage
|
||||
FROM alpine
|
||||
RUN apk add --no-cache --update bash iproute2 libpcap libnetfilter_queue
|
||||
COPY --from=build-env /gocode/src/github.com/bettercap/bettercap/bettercap /app/
|
||||
COPY --from=build-env /go/src/github.com/bettercap/bettercap/bettercap /app/
|
||||
WORKDIR /app
|
||||
EXPOSE 80 443 53 5300 8080 8081 8082 8083 8000
|
||||
ENTRYPOINT ["/app/bettercap"]
|
||||
|
|
6
Makefile
6
Makefile
|
@ -10,9 +10,9 @@ build: resources
|
|||
@echo "@ Building ..."
|
||||
@go build -o $(TARGET) .
|
||||
|
||||
resources: oui
|
||||
resources: network/oui.go
|
||||
|
||||
oui:
|
||||
network/oui.go:
|
||||
@python ./network/make_oui.py
|
||||
|
||||
vet:
|
||||
|
@ -25,7 +25,7 @@ lint:
|
|||
@golint ./...
|
||||
|
||||
deps:
|
||||
@go get ./...
|
||||
@dep ensure
|
||||
|
||||
clean:
|
||||
@rm -rf $(TARGET).*
|
||||
|
|
45853
network/oui.go
45853
network/oui.go
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue