desktop support
This commit is contained in:
		
							
								
								
									
										31
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,33 +1,32 @@
 | 
			
		||||
FROM python:3.11-alpine AS base
 | 
			
		||||
FROM python:3.13-alpine AS builder
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
RUN apk add --no-cache rustup gcc musl-dev
 | 
			
		||||
RUN --mount=type=cache,target=/var/cache/apk apk add --update-cache rustup gcc musl-dev
 | 
			
		||||
RUN rustup-init -y --profile minimal
 | 
			
		||||
 | 
			
		||||
# install rant
 | 
			
		||||
RUN cargo install --color=never rant --version 4.0.0-alpha.33 --root / --features cli
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# python prereqs
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# installing app
 | 
			
		||||
COPY app/requirements.txt /app/requirements.txt
 | 
			
		||||
RUN pip install -r /app/requirements.txt
 | 
			
		||||
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /app/requirements.txt
 | 
			
		||||
COPY app /app
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
# cleanup 
 | 
			
		||||
RUN cargo install cargo-cache --root /
 | 
			
		||||
RUN cargo cache --remove-dir all
 | 
			
		||||
RUN pip cache purge
 | 
			
		||||
RUN apk del rustup gcc musl-dev
 | 
			
		||||
 | 
			
		||||
FROM base AS app
 | 
			
		||||
# wordlist
 | 
			
		||||
RUN mkdir -p /lib/wordlist
 | 
			
		||||
COPY ext/imsky/wordlists /lib/wordlist
 | 
			
		||||
RUN mkdir -p /app/rant
 | 
			
		||||
RUN python /lib/wordlist/render.py -o rant /app/rant/wordlist.rant
 | 
			
		||||
 | 
			
		||||
# installing app
 | 
			
		||||
COPY app /app
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
CMD [ "python", "index.wsgi" ]
 | 
			
		||||
EXPOSE 80
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user