File tree Expand file tree Collapse file tree 2 files changed +56
-4
lines changed Expand file tree Collapse file tree 2 files changed +56
-4
lines changed Original file line number Diff line number Diff line change 1+ # Using www.github.com/wtfbbqhax/krakatoa
2+ FROM arm64v8/krakatoa AS libpacket_dev_env
3+
4+ USER root
5+ RUN apk update
6+
7+ VOLUME /volume/libpacket
8+ WORKDIR /volume/libpacket
9+
10+ RUN apk add \
11+ libdaq-dev@local \
12+ libdaq-pcap-module@local \
13+ libdaq-dump-module@local
14+
15+ RUN apk add \
16+ build-base \
17+ cmake \
18+ ninja \
19+ gtest-dev
20+
21+ RUN echo alias vi=nvim > /root/.profile
22+
23+ RUN apk add neovim tmux ctags
Original file line number Diff line number Diff line change 1- .PHONY : build clean install test uninstall
1+ .DEFAULT_GOAL := build
22
3+ # Makefile rules to build the libpacket source code
4+ .PHONY : build
35build :
46 cmake -B build -G Ninja . \
57 -D CMAKE_BUILD_TYPE:STRING=Debug \
68 -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
79 cmake --build build
810
9- clean :
10- rm -rf build/
11-
11+ .PHONY : install
1212install : build
1313 cmake --install build
1414
15+ .PHONY : clean
16+ clean :
17+ rm -rf build/
18+
19+ .PHONY : test
1520test : install
1621 make -C tests/
1722
23+ .PHONY : uninstall
1824uninstall :
1925 rm -f /usr/local/include/packet.h
2026 rm -rf /usr/local/include/packet/
2127 rm -f /usr/local/lib/libpacket.so.*
2228 rm -f /usr/local/lib/libpacket.so
29+
30+ # Makefile rules to build the libpacket development environment.
31+ #
32+ # If you have a working Docker environment, you can use and contribute to this
33+ # code base.
34+ IMAGE_NAME =wtfbbqhax/libpacket
35+
36+ .PHONY : container
37+ container :
38+ docker build . -f Containerfile -t $(IMAGE_NAME )
39+
40+ .PHONY : start
41+ start :
42+ docker run --rm -td -v " $( PWD) " :/volume/libpacket " $( IMAGE_NAME) "
43+
44+ .PHONY : kill
45+ kill :
46+ docker kill $(shell docker ps --filter "ancestor=$(IMAGE_NAME ) " --format "{{.ID}}")
47+
48+ .PHONY : attach
49+ attach :
50+ docker exec -ti $(shell docker ps --filter "ancestor=$(IMAGE_NAME ) " --format "{{.ID}}" | head -n1) sh
51+
You can’t perform that action at this time.
0 commit comments