simplified Dockerfile and improved build process

This commit is contained in:
evilsocket 2018-04-18 12:05:29 +02:00
commit 3b22341e34
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 22934 additions and 22934 deletions

View file

@ -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"]

View file

@ -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).*

File diff suppressed because it is too large Load diff