-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (18 loc) · 857 Bytes
/
Dockerfile
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.12-bookworm AS nsfw_proxy
RUN mkdir -p /home/app
COPY . /home/app
WORKDIR /home/app
# Installing rust. Needed for installing mitmproxy as python dependency
RUN apt update -y
RUN apt install make curl git build-essential scdoc -y
RUN curl --proto '=https' -tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN python -m venv nsfw_proxy
RUN nsfw_proxy/bin/pip install -r requirements.txt
EXPOSE 8080
VOLUME /root/.mitmproxy
ENTRYPOINT [ "./nsfw_proxy/bin/mitmdump", "-s", "nsfw.py", "--listen-port", "8080" ]
FROM nsfw_proxy AS nsfw_proxy_bonk
RUN git clone https://git.sr.ht/~jamesponddotco/bonk && cd /home/app/bonk && make && make install;
WORKDIR /home/app
ENTRYPOINT [ "./nsfw_proxy/bin/mitmdump", "-s", "nsfw.py", "--set", "command=bonk <dir>", "--set", "level=0.2", "--listen-port", "8080" ]