2018-05-11 20:16:23 +00:00
|
|
|
FROM ubuntu:18.04
|
2017-01-31 15:56:42 +00:00
|
|
|
|
2017-04-06 00:58:31 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2017-01-31 15:56:42 +00:00
|
|
|
EXPOSE 9050
|
|
|
|
|
|
|
|
EXPOSE 53
|
|
|
|
|
2017-03-22 16:44:08 +00:00
|
|
|
EXPOSE 9077
|
|
|
|
|
2018-05-10 01:15:58 +00:00
|
|
|
ENV PARENT_DATA_DIRECTORTY /var/lib/tor-router
|
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
ENV TOR_PATH /usr/bin/tor
|
2017-03-12 17:38:47 +00:00
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
ENV PATH $PATH:/app/bin
|
2017-01-31 15:56:42 +00:00
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
ADD https://deb.nodesource.com/setup_8.x /tmp/nodejs_install
|
2017-01-31 15:56:42 +00:00
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
RUN apt-get update && apt-get -y install dirmngr
|
|
|
|
|
|
|
|
RUN gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
|
|
|
|
|
|
|
|
RUN echo 'deb http://deb.torproject.org/torproject.org artful main\n\
|
|
|
|
\n\
|
|
|
|
deb-src http://deb.torproject.org/torproject.org artful main'\
|
|
|
|
>> /etc/apt/sources.list.d/tor.list
|
|
|
|
|
|
|
|
RUN bash /tmp/nodejs_install
|
|
|
|
|
|
|
|
RUN apt-get install -y nodejs tor git
|
2017-04-06 00:58:31 +00:00
|
|
|
|
2018-05-10 05:01:13 +00:00
|
|
|
RUN useradd -ms /bin/bash tor_router
|
2018-05-08 05:56:48 +00:00
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
RUN chown -hR tor_router:tor_router /app
|
|
|
|
|
2018-05-08 05:56:48 +00:00
|
|
|
USER tor_router
|
|
|
|
|
2018-05-11 20:16:23 +00:00
|
|
|
ADD package.json /app/package.json
|
|
|
|
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
ADD . /app
|
|
|
|
|
2018-05-08 05:56:48 +00:00
|
|
|
ENV HOME /home/tor_router
|
|
|
|
|
2017-12-07 23:50:37 +00:00
|
|
|
ENTRYPOINT [ "tor-router" ]
|
|
|
|
|
|
|
|
CMD [ "-s", "-d", "-j", "1" ]
|