downloads tor from torproject. adds pipeline file for bitbucket
This commit is contained in:
parent
7f9555ea2e
commit
8f6dfaa060
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue