| 
									
										
										
										
											2024-11-26 17:25:41 +00:00
										 |  |  | FROM alpine:3.20 | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 |  |  | # Install packages | 
					
						
							| 
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 |  |  | RUN apk --no-cache -U upgrade && \ | 
					
						
							|  |  |  |     apk --no-cache -U add \ | 
					
						
							| 
									
										
										
										
											2024-03-05 18:50:35 +00:00
										 |  |  | 		git \ | 
					
						
							|  |  |  | 		libcap \ | 
					
						
							|  |  |  | 		py3-libxml2 \ | 
					
						
							|  |  |  | 		py3-lxml \ | 
					
						
							|  |  |  | 		py3-pip \ | 
					
						
							|  |  |  | 		python3 \ | 
					
						
							|  |  |  | 		python3-dev \ | 
					
						
							|  |  |  | 		tshark && \ | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  | # Setup user | 
					
						
							|  |  |  |     addgroup -g 2000 fatt && \ | 
					
						
							|  |  |  |     adduser -S -s /bin/ash -u 2000 -D -g 2000 fatt && \ | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  | # Install fatt | 
					
						
							| 
									
										
										
										
											2019-06-01 17:47:14 +00:00
										 |  |  |     mkdir -p /opt && \ | 
					
						
							|  |  |  |     cd /opt && \ | 
					
						
							| 
									
										
										
										
											2020-09-04 12:37:28 +00:00
										 |  |  |     git clone https://github.com/0x4D31/fatt && \ | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  |     cd fatt && \ | 
					
						
							| 
									
										
										
										
											2022-10-13 14:06:09 +00:00
										 |  |  |     git checkout c29e553514281e50781f86932b82337a5ada5640 && \ | 
					
						
							| 
									
										
										
										
											2019-06-01 17:47:14 +00:00
										 |  |  |     mkdir -p log && \ | 
					
						
							| 
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 |  |  |     pip3 install --no-cache-dir --break-system-packages pyshark && \ | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  | # Setup configs | 
					
						
							| 
									
										
										
										
											2022-03-08 23:36:03 +00:00
										 |  |  |     chgrp fatt /usr/bin/dumpcap && \ | 
					
						
							|  |  |  |     setcap cap_net_raw,cap_net_admin=+eip /usr/bin/dumpcap && \ | 
					
						
							| 
									
										
										
										
											2019-06-01 17:47:14 +00:00
										 |  |  |     chown fatt:fatt -R /opt/fatt/* && \ | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  | # Clean up | 
					
						
							|  |  |  |     apk del --purge git \ | 
					
						
							| 
									
										
										
										
											2024-11-26 17:25:41 +00:00
										 |  |  |             python3-dev && \ | 
					
						
							| 
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 |  |  |     rm -rf /root/* \ | 
					
						
							|  |  |  |             /var/cache/apk/* \ | 
					
						
							|  |  |  |             /opt/fatt/.git | 
					
						
							| 
									
										
										
										
											2019-06-04 14:21:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-31 17:52:39 +00:00
										 |  |  | # Start fatt | 
					
						
							|  |  |  | STOPSIGNAL SIGINT | 
					
						
							| 
									
										
										
										
											2019-06-01 17:47:14 +00:00
										 |  |  | ENV PYTHONPATH /opt/fatt | 
					
						
							|  |  |  | WORKDIR /opt/fatt | 
					
						
							| 
									
										
										
										
											2022-03-08 23:36:03 +00:00
										 |  |  | USER fatt:fatt | 
					
						
							| 
									
										
										
										
											2025-03-13 23:31:32 +00:00
										 |  |  | CMD python3 fatt.py -i $(ip route | grep "^default" | awk '{ print $5 }') --print_output --json_logging -o log/fatt.log |