2024-11-26 16:05:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM ubuntu:24.04
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 14:13:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ENV DEBIAN_FRONTEND=noninteractive
							 | 
						
					
						
							
								
									
										
										
										
											2025-06-30 14:06:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ENV LS_VER=8.18.3
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-07 00:35:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Include dist
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-08 23:36:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								COPY dist/ /root/dist/
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Install packages
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN apt-get update -y && \
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    apt-get upgrade -y && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    apt-get install -y \
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 16:05:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    		 adduser \
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-15 22:23:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								             aria2 \
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-22 23:18:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								             bash \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								             bzip2 \
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-05 19:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								             curl && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Determine arch, get and install packages
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    ARCH=$(arch) && \
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 14:50:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    if [ "$ARCH" = "x86_64" ]; then LS_ARCH="amd64"; export _JAVA_OPTIONS=""; fi && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    if [ "$ARCH" = "aarch64" ]; then LS_ARCH="arm64"; export _JAVA_OPTIONS="-XX:UseSVE=0"; fi && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    echo "$ARCH" && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    mkdir -p /etc/listbot && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-15 08:32:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cd /etc/listbot && \
							 | 
						
					
						
							
								
									
										
										
										
											2020-05-12 09:19:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/cve.yaml.bz2 && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/iprep.yaml.bz2 && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bunzip2 *.bz2 && \
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cd /root/dist/ && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/logstash/logstash-$LS_VER-$LS_ARCH.deb && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    dpkg -i logstash-$LS_VER-$LS_ARCH.deb && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Add and move files
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cd /root/dist/ && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cp entrypoint.sh /usr/bin/ && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    chmod u+x /usr/bin/entrypoint.sh && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-31 14:46:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    mkdir -p /usr/share/logstash/config && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cp logstash.conf /etc/logstash/ && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cp http_input.conf /etc/logstash/ && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cp http_output.conf /etc/logstash/ && \
							 | 
						
					
						
							
								
									
										
										
										
											2021-12-08 23:55:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cp pipelines.yml /usr/share/logstash/config/pipelines.yml && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cp pipelines_sensor.yml /usr/share/logstash/config/pipelines_sensor.yml && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-16 02:55:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cp tpot-template.json /etc/logstash/ && \
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-31 15:21:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cd /usr/share/logstash && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    bin/logstash-plugin update logstash-filter-translate && \
							 | 
						
					
						
							
								
									
										
										
										
											2025-06-30 14:06:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bin/logstash-plugin install logstash-output-syslog && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 20:32:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    rm /etc/logstash/pipelines.yml && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-31 14:46:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    rm /etc/logstash/logstash.yml && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2018-03-31 15:18:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Setup user, groups and configs
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    groupmod -g 2000 logstash && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    usermod -u 2000 logstash && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    chown -R logstash:logstash /etc/listbot \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                               /var/log/logstash/ \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											       /var/lib/logstash \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 15:53:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											       /usr/share/logstash/data \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											       /usr/share/logstash/config/pipelines* && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    chmod 755 /usr/bin/entrypoint.sh && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Clean up
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    apt-get autoremove -y --purge && \
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    apt-get clean && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        rm -rf /var/lib/apt/lists/* \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /tmp/* /var/tmp/* \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /root/.cache \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /root/*
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Healthcheck
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9600'
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-14 14:43:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-23 11:02:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Start logstash
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-23 14:49:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								USER logstash:logstash
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-07 00:35:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CMD ["entrypoint.sh"]
							 |