-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (24 loc) · 1.15 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (24 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.14-slim
LABEL maintainer="maurosoria@protonmail.com"
ARG DIRSEARCH_STACK=async
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /opt/dirsearch
COPY . /opt/dirsearch/
RUN python -m pip install --upgrade pip setuptools wheel \
&& python -m pip install --only-binary=:all: -r requirements.txt -r requirements/db.txt \
&& if [ "$DIRSEARCH_STACK" = "native-rust" ]; then \
apt-get update \
&& apt-get install -y --no-install-recommends build-essential ca-certificates curl \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal \
&& . "$HOME/.cargo/env" \
&& python -m pip install --only-binary=:all: maturin \
&& python scripts/build_native.py --out dist/native-wheels \
&& python -m pip uninstall -y maturin \
&& rm -rf dist/native-wheels native/target "$HOME/.cargo" "$HOME/.rustup" \
&& apt-get purge -y --auto-remove build-essential curl \
&& rm -rf /var/lib/apt/lists/*; \
fi \
&& python scripts/configure_stack.py config.ini "$DIRSEARCH_STACK" \
&& chmod +x dirsearch.py
ENTRYPOINT ["python", "dirsearch.py"]
CMD ["--help"]