42 lines
887 B
Docker
42 lines
887 B
Docker
FROM alpine:3.20
|
|
|
|
RUN apk update && \
|
|
apk upgrade && \
|
|
apk add --no-cache nginx tor openssh && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
# Setup SSH
|
|
|
|
RUN mkdir -p /var/run/sshd && \
|
|
ssh-keygen -A && \
|
|
echo "root:password" | chpasswd
|
|
|
|
COPY sshd_config /etc/ssh/sshd_config
|
|
|
|
# Setup Nginx
|
|
RUN mkdir -p /var/www/html && \
|
|
mkdir -p /var/log/nginx && \
|
|
mkdir -p /run/nginx && \
|
|
chown -R nginx:nginx /var/www/html && \
|
|
chown -R nginx:nginx /var/log/nginx && \
|
|
chown -R nginx:nginx /run/nginx
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Setup Tor
|
|
RUN mkdir -p /var/lib/tor && \
|
|
mkdir -p /var/log/tor
|
|
|
|
COPY torrc /etc/tor/torrc
|
|
|
|
# Copy the index.html and entrypoint script
|
|
COPY index.html /var/www/html/index.html
|
|
|
|
# Copy the entrypoint script and make it executable
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 4242
|
|
|
|
CMD ["/entrypoint.sh"]
|