| 
									
										
										
										
											2025-02-20 16:29:16 +00:00
										 |  |  | FROM alpine:3.20 | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Include dist | 
					
						
							|  |  |  | COPY dist/ /opt/tpot/ | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 |  |  | # Install packages | 
					
						
							| 
									
										
										
										
											2024-12-05 17:14:27 +00:00
										 |  |  | RUN apk --no-cache -U upgrade && \ | 
					
						
							|  |  |  |     apk --no-cache -U add \ | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  |         aria2 \ | 
					
						
							|  |  |  |         apache2-utils \ | 
					
						
							|  |  |  |         bash \ | 
					
						
							| 
									
										
										
										
											2023-06-14 00:17:09 +00:00
										 |  |  |         bind-tools \ | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  |         conntrack-tools \ | 
					
						
							| 
									
										
										
										
											2024-03-13 15:30:17 +00:00
										 |  |  | 		cracklib \ | 
					
						
							| 
									
										
										
										
											2023-06-14 00:17:09 +00:00
										 |  |  |         curl \ | 
					
						
							|  |  |  |         ethtool \ | 
					
						
							|  |  |  |         figlet \ | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  |         git \ | 
					
						
							|  |  |  |         grep \ | 
					
						
							| 
									
										
										
										
											2023-06-14 00:17:09 +00:00
										 |  |  |         iproute2 \ | 
					
						
							|  |  |  |         iptables \ | 
					
						
							|  |  |  |         jq \ | 
					
						
							|  |  |  |         logrotate \ | 
					
						
							|  |  |  |         lsblk \ | 
					
						
							|  |  |  |         net-tools \ | 
					
						
							|  |  |  |         openssl \ | 
					
						
							|  |  |  |         pigz \ | 
					
						
							|  |  |  |         tar \ | 
					
						
							| 
									
										
										
										
											2025-02-20 16:29:16 +00:00
										 |  |  |         uuidgen \ | 
					
						
							|  |  |  |         yq-go && \ | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-12-16 12:30:08 +00:00
										 |  |  | # Setup user, logrotate permissions | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  |     addgroup -g 2000 tpot && \ | 
					
						
							|  |  |  |     adduser -S -s /bin/ash -u 2000 -D -g 2000 tpot && \ | 
					
						
							| 
									
										
										
										
											2024-12-16 12:30:08 +00:00
										 |  |  |     chmod 0600 /opt/tpot/etc/logrotate/logrotate.conf && \ | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Clean up | 
					
						
							|  |  |  |     apk del --purge git && \ | 
					
						
							| 
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 |  |  |     rm -rf /root/* /tmp/* \ | 
					
						
							|  |  |  |            /root/.cache \ | 
					
						
							|  |  |  |            /opt/tpot/.git \ | 
					
						
							|  |  |  |            /var/cache/apk/* | 
					
						
							| 
									
										
										
										
											2023-06-13 21:59:09 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Run tpotinit | 
					
						
							|  |  |  | WORKDIR /opt/tpot | 
					
						
							| 
									
										
										
										
											2024-02-28 20:05:03 +00:00
										 |  |  | #HEALTHCHECK --interval=5s --timeout=30s --retries=3 CMD pgrep -f autoheal || exit 1 | 
					
						
							|  |  |  | HEALTHCHECK --retries=1000 --interval=5s CMD test -f /tmp/success || exit 1 | 
					
						
							| 
									
										
										
										
											2024-03-12 16:03:43 +00:00
										 |  |  | STOPSIGNAL SIGTERM | 
					
						
							| 
									
										
										
										
											2024-03-15 21:41:12 +00:00
										 |  |  | # Using ENTRYPOINT so we can catch SIGTERM for cleanup | 
					
						
							| 
									
										
										
										
											2024-03-12 16:03:43 +00:00
										 |  |  | ENTRYPOINT ["/opt/tpot/entrypoint.sh"] |