-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (28 loc) · 1.16 KB
/
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
30
31
32
33
34
FROM debian:bookworm-slim
WORKDIR /tmp
# Required environment variables
ENV ONION_HOSTNAME="changeme"
ENV ONION_PUBLIC_KEY_B64="changeme"
ENV ONION_SECRET_KEY_B64="changeme"
ENV ONION_PORT="changeme"
# Install updates
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
apt-transport-https ca-certificates curl gnupg2 sudo \
&& rm -rf /var/lib/apt/lists/*
# Install tor repository
RUN echo "deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org bookworm main" > /etc/apt/sources.list.d/tor.list
RUN curl -o /tmp/tor-archive-keyring https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc
RUN gpg --dearmor /tmp/tor-archive-keyring
RUN cp /tmp/tor-archive-keyring.gpg /usr/share/keyrings/tor-archive-keyring.gpg
# Install tor
RUN apt-get update && \
apt-get install -y --no-install-recommends \
tor deb.torproject.org-keyring \
&& rm -rf /var/lib/apt/lists/*
# Copy the entrypoint script into the image
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set the script as the entrypoint
ENTRYPOINT ["/entrypoint.sh"]