Skip to content

Commit

Permalink
add entrypoint to eve
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Graf committed Mar 6, 2022
1 parent 211ec53 commit e84de51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eve/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ RUN apt-get update &&\
# Copy bettercap from the builder image.
COPY --from=build-env /go/bettercap/bettercap /usr/bin/

# RUN apk add --no-cache bash iproute2 libpcap libusb-dev libnetfilter_queue wireless-tools
COPY ./entrypoint.sh /entrypoint.sh

# Make the device needed to run a tap device.
# NOTE: This does not seem to work consistently as a buld step, so an entrypoint script is also
# included that will execute the same commands at runtime if the device is missing.
RUN mkdir /dev/net &&\
mknod /dev/net/tun c 10 200

WORKDIR /root
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD ["/bin/bash"]
9 changes: 9 additions & 0 deletions eve/build/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

if [ ! -f /dev/net/tun ]; then
mkdir /dev/net
mknod /dev/net/tun c 10 200
fi

exec "$@"

0 comments on commit e84de51

Please sign in to comment.