downloads tor from torproject. adds pipeline file for bitbucket

This commit is contained in:
Zachary Boyd 2017-03-12 13:14:39 -04:00
parent 7f9555ea2e
commit 8f6dfaa060
2 changed files with 11 additions and 3 deletions

View file

@ -10,11 +10,13 @@ ENV SOCKS_PORT 9050
ENV INSTANCES 3
ADD tor-sources.list /etc/apt/sources.list.d/tor.list
ADD https://deb.nodesource.com/setup_7.x /tmp/nodejs_install
RUN bash /tmp/nodejs_install
RUN apt install -y nodejs tor git
RUN apt install -y --allow-unauthenticated deb.torproject.org-keyring nodejs tor git
ADD . /app
@ -23,6 +25,6 @@ WORKDIR /app
RUN npm install
# Grab the current local timezone from an external api and save it into /etc/timezone, otherwise Tor will complain and won't start
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
RUN bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
CMD npm start

View file

@ -1,7 +1,13 @@
image: znetstar/tor-router
image: ubuntu:16.10
pipelines:
default:
- step:
script:
- cp tor-sources.list /etc/apt/sources.list.d/tor.list
- apt update && apt install -y curl tor git
- curl -sL https://deb.nodesource.com/setup_7.x > /tmp/node_install
- bash /tmp/node_install && apt install -y nodejs
- npm install
- bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
- npm test