From 8f6dfaa060eaeef48df295da6f73b60779e0a07c Mon Sep 17 00:00:00 2001 From: Zachary Boyd Date: Sun, 12 Mar 2017 13:14:39 -0400 Subject: [PATCH] downloads tor from torproject. adds pipeline file for bitbucket --- Dockerfile | 6 ++++-- bitbucket-pipelines.yaml | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 703532f..d49f6aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file diff --git a/bitbucket-pipelines.yaml b/bitbucket-pipelines.yaml index 51bda76..bd81f70 100644 --- a/bitbucket-pipelines.yaml +++ b/bitbucket-pipelines.yaml @@ -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 \ No newline at end of file