2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM python:3.13-alpine AS builder
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# install rust environment (for rant)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUST_VERSION=1.61.0
							 | 
						
					
						
							
								
									
										
										
										
											2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN --mount=type=cache,target=/var/cache/apk apk add --update-cache rustup gcc musl-dev
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 13:53:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN rustup-init -y --profile minimal
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# install rant
							 | 
						
					
						
							
								
									
										
										
										
											2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN --mount=type=cache,target=/root/.cargo \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --mount=type=cache,target=/usr/local/cargo/git/db \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --mount=type=cache,target=/usr/local/cargo/registry \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cargo install --color=never rant --version 4.0.0-alpha.33 --root /opt/rant --features cli
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM python:3.13-alpine AS app
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/opt/rant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUST_VERSION=1.61.0
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY --from=builder /opt/rant /opt/rant
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 13:53:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# installing app
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY app/requirements.txt /app/requirements.txt
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN --mount=type=cache,target=/root/.cache/pip pip install -r /app/requirements.txt
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY app /app
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								WORKDIR /app
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 13:53:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-07-29 12:50:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# wordlist
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN mkdir -p /lib/wordlist
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY ext/imsky/wordlists /lib/wordlist
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-24 12:39:18 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN mkdir -p /app/rant
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								RUN python /lib/wordlist/render.py -o rant /app/rant/wordlist.rant
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CMD [ "python", "index.wsgi" ]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								EXPOSE 80
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 13:53:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM app AS dev
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-28 21:08:47 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								COPY static /app/static
							 |