2024-11-14 16:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								FROM golang:1.23-alpine AS builder
							 
						 
					
						
							
								
									
										
										
										
											2024-09-04 19:45:00 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ENV GO111MODULE=on \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    CGO_ENABLED=0 \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    GOOS=linux
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
									
										
										
										
											2024-09-11 10:42:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Install packages
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN apk -U add git
							 
						 
					
						
							
								
									
										
										
										
											2024-09-04 19:45:00 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								WORKDIR /root
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Build beelzebub
							 
						 
					
						
							
								
									
										
										
										
											2024-12-05 20:12:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUN git clone https://github.com/t3chn0m4g3/beelzebub && \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    cd beelzebub && \
							 
						 
					
						
							
								
									
										
										
										
											2025-01-09 18:41:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    git checkout 0b9aba53ec1671f669d22782758142a1d411b858
							 
						 
					
						
							
								
									
										
										
										
											2024-09-04 19:45:00 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								WORKDIR /root/beelzebub
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN go mod download
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN go build -o main .
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 16:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUN sed -i "s#logsPath: ./log#logsPath: ./configurations/log/beelzebub.json#g" /root/beelzebub/configurations/beelzebub.yaml
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN sed -i 's/passwordRegex: "^(root|qwerty|Smoker666|123456|jenkins|minecraft|sinus|alex|postgres|Ly123456)$"/passwordRegex: ".*"/g' /root/beelzebub/configurations/services/ssh-22.yaml
							 
						 
					
						
							
								
									
										
										
										
											2024-09-04 19:45:00 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 16:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								FROM scratch
							 
						 
					
						
							
								
									
										
										
										
											2024-09-04 19:45:00 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								COPY --from=builder /root/beelzebub/main /opt/beelzebub/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								COPY --from=builder /root/beelzebub/configurations /opt/beelzebub/configurations
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Start beelzebub
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								WORKDIR /opt/beelzebub
							 
						 
					
						
							
								
									
										
										
										
											2024-11-14 16:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								USER 2000:2000
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ENTRYPOINT ["./main"]