FROM alpine RUN adduser --disabled-password --gecos "" tor RUN apk update && apk add tor COPY hidden_service /hidden_service COPY torrc /etc/tor/torrc COPY entrypoint.sh / RUN chown -R tor /etc/tor RUN chown -R tor /hidden_service RUN chown -R tor /entrypoint.sh RUN chmod -R go-rwx /etc/tor RUN chmod -R go-rwx /hidden_service USER tor ENTRYPOINT ["/entrypoint.sh"]