-
Notifications
You must be signed in to change notification settings - Fork 51
/
Dockerfile
47 lines (36 loc) · 1.01 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
35
36
37
38
39
40
41
42
43
44
45
46
FROM debian:jessie
LABEL maintainer "opsxcq@strm.sh"
# Base packages
RUN apt-get update && \
apt-get -y install \
nginx \
tor torsocks ntpdate
# Compile shallot
ADD ./shallot /shallot
RUN apt-get -y install \
build-essential \
libssl-dev && \
cd /shallot && \
./configure && \
make && \
mv ./shallot /bin && \
cd / && \
rm -Rf /shallot && \
apt-get -y purge build-essential libssl-dev && \
rm -Rf /var/lib/apt/lists/*
# Security and permissions
RUN useradd --system --uid 666 -M --shell /usr/sbin/nologin hidden
# Configure nginx logs to go to Docker log collection (via stdout/stderr)
RUN ln --symbolic --force /dev/stdout /var/log/nginx/access.log
RUN ln --symbolic --force /dev/stderr /var/log/nginx/error.log
# Main script
ADD ./main.sh /main.sh
# Tor Config
ADD ./torrc /etc/tor/torrc
# Add nginx default configuration
ADD ./nginx.conf /etc/nginx/nginx.conf
# Configuration files and data output folder
VOLUME /web
WORKDIR /web
ENTRYPOINT ["/main.sh"]
CMD ["serve"]