tor-router/Dockerfile

28 lines
662 B
Docker
Raw Normal View History

2017-01-31 15:56:42 +00:00
FROM ubuntu:16.10
EXPOSE 9050
EXPOSE 53
2017-01-31 23:11:36 +00:00
ENV DNS_PORT 53
ENV SOCKS_PORT 9050
2017-01-31 23:16:57 +00:00
ENV INSTANCES 3
2017-01-31 15:56:42 +00:00
ADD https://deb.nodesource.com/setup_7.x /nodejs_install
RUN bash /nodejs_install
RUN apt install -y nodejs tor git
ADD . /app
WORKDIR /app
RUN npm install
2017-02-01 00:55:09 +00:00
# Grab the current local timezone from an external api and save it into /etc/timezone, otherwise Tor will complain and won't start
2017-02-01 00:54:31 +00:00
RUN curl -sL http://ip-api.com/json | node -e "process.stdin.resume(); process.stdin.on('data', (data) => { process.stdout.write(JSON.parse(data.toString('utf8')).timezone); process.exit(0); });" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
2017-01-31 15:56:42 +00:00
CMD npm start