TCPdump container

master
aljazmedic 2022-11-18 20:11:15 +01:00
parent 00798a5247
commit 9bbd730380
3 changed files with 13 additions and 2 deletions

View File

@ -19,10 +19,11 @@ COPY . ./
#RUN npm install -g nodemon
RUN mkdir /uploads && chown appuser:appgroup /uploads
RUN mkdir /pcaps
RUN apt-get install tcpdump -y
EXPOSE 3000
USER appuser
CMD ["node", "server.js"]
# CMD ["nodemon", "server.js"]

9
backend/cycle_tcpdump.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
packet=$((9000))
while true
do
tcpdump -c 1000 -i any -w "/pcaps/traffic-2$packet.pcap"
packet=$((packet + 1))
done

View File

@ -7,6 +7,7 @@ services:
- db
volumes:
- "vol-uploads:/uploads"
- "/pcaps_s3:/pcaps"
restart: on-failure
frontend:
build: ./frontend