Reverts back to ubuntu dockerfile and uses system Tor

This commit is contained in:
Zachary Boyd 2018-05-11 13:16:23 -07:00
parent 18d047b933
commit e6ad6204b8

View file

@ -1,4 +1,4 @@
FROM node:8
FROM ubuntu:18.04
WORKDIR /app
@ -10,7 +10,30 @@ EXPOSE 9077
ENV PARENT_DATA_DIRECTORTY /var/lib/tor-router
ENV PATH $PATH:/app/bin
ENV TOR_PATH /usr/bin/tor
ENV PATH $PATH:/app/bin
ADD https://deb.nodesource.com/setup_8.x /tmp/nodejs_install
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
RUN useradd -ms /bin/bash tor_router
RUN chown -hR tor_router:tor_router /app
USER tor_router
ADD package.json /app/package.json
@ -18,10 +41,6 @@ RUN npm install
ADD . /app
RUN useradd -ms /bin/bash tor_router
USER tor_router
ENV HOME /home/tor_router
ENTRYPOINT [ "tor-router" ]