Description of the bug or feature request
The current Dockerfile tries to build from Alpine but does not finish.
[node1] (local) [email protected] ~/bettercap
$ docker build -t bettercap .
Sending build context to Docker daemon 23.78MB
Step 1/15 : FROM golang:1.10-alpine AS build-env
---> 52d894fca6d4
Step 2/15 : ENV GOPATH=/gocode
---> Using cache
---> fed4591c0cf4
Step 3/15 : ENV SRC_DIR=/gocode/src/github.com/bettercap/bettercap
---> Using cache
---> ef6145f37d26
Step 4/15 : RUN apk add --update ca-certificates
---> Using cache
---> 0a8c34b803d4
Step 5/15 : RUN apk add --no-cache --update bash iptables wireless-tools build-base libpcap-dev git python py-six
---> Using cache
---> 9d35ca053353
Step 6/15 : WORKDIR $SRC_DIR
---> Using cache
---> 1e7f138edaf8
Step 7/15 : ADD . $SRC_DIR
---> Using cache
---> 9e28f1548ccc
Step 8/15 : RUN make deps
---> Running in 4a4c802c7c50
# pkg-config --cflags libnetfilter_queue
Package libnetfilter_queue was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnetfilter_queue.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libnetfilter_queue', required by 'virtual:world', not found
pkg-config: exit status 1
make: *** [Makefile:28: deps] Error 2
The command '/bin/sh -c make deps' returned a non-zero code: 2
[node1] (local) [email protected] ~/bettercap
$
The current travis build uses a debian-based dockerfile, thus installing the libnetfilter_queue correctly.
The provided example is by doing a git pull of the bettercap repo. This was done on the play-with-docker.com docker hosts.
Imho, we should either find a way to build the missing lib for Alpine or revert to a Debian based Dockerfile.
Best regards,
--
♥ ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY ♥
Or just remove Docker because I'm super tired of it ...
To be honest I don't know Docker enough to fix this, hoping that someone can send a PR ...
It seams to be related to Alpine Linux, not Docker.
I will be able to test it tomorrow.
But trying to simplify it might be a good start.
It could look like this:
FROM golang:alpine
RUN apk add --update ca-certificates iproute2 libpcap-dev # bash -do you really need "bash" ? Alpine uses "ash"
RUN apk add --no-cache --update bash iptables wireless-tools build-base libpcap-dev git python py-six
# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/github.com/bettercap/bettercap
Install any go dependencies ?
# RUN go get github.com/...
RUN go install github.com/bettercap/bettercap
EXPOSE 80 443 53 5300 8080 8081 8082 8083 8000
ENTRYPOINT /go/bin/bettercap
Most helpful comment
Or just remove Docker because I'm super tired of it ...