-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
51 lines (44 loc) · 2.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
dist: bionic
services: docker
before_install:
# Upgrade Docker.
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
script:
# Test building Dockerfile.
- docker build -t local-tor-server .
## Test running the container with commands from the Readme
- echo "*** Quickstart - Tor relay server ***"
- mkdir -vp tor-data
- docker run -d --init --name=tor-server_relay_1 --net=host -e TOR_NICKNAME=Tor4 -e [email protected] -v $PWD/tests/tor-data:/var/lib/tor --restart=always local-tor-server
- sleep 30
- docker logs tor-server_relay_1
- docker cp tor-server_relay_1:/usr/local/etc/tor/torrc.sample ./
- cat torrc.sample
- docker stop tor-server_relay_1
- docker rm tor-server_relay_1
- echo "*** Run Tor with a mounted `torrc` configuration ***"
- mkdir -vp tor-data
- docker run -d --init --name=tor-server_relay_1 --net=host -e TOR_NICKNAME=Tor4 -e [email protected] -v $PWD/tests/tor-data:/var/lib/tor -v $PWD/tests/torrc:/etc/tor/torrc --restart=always local-tor-server
- sleep 30
- docker logs tor-server_relay_1
- docker cp tor-server_relay_1:/var/lib/tor/keys/secret_id_key ./
- docker cp tor-server_relay_1:/var/lib/tor/keys/ed25519_master_id_secret_key ./
- cat secret_id_key
- docker stop tor-server_relay_1
- docker rm tor-server_relay_1
- echo "*** Mount customized torrc and the identity keys from a previous Tor relay server installation ***"
- docker run -d --init --name=tor-server_relay_1 --net=host -v $PWD/tests/torrc:/etc/tor/torrc -v $PWD/tests/tor-data/keys/secret_id_key:/var/lib/tor/keys/secret_id_key -v $PWD/tests/tor-data/keys/ed25519_master_id_secret_key:/var/lib/tor/ed25519_master_id_secret_key --restart=always local-tor-server
- sleep 30
- docker logs tor-server_relay_1
- docker stop tor-server_relay_1
- docker rm tor-server_relay_1
- echo "Run a Tor relay server as obfuscated bridge with docker-compose with locally built image"
- docker-compose --version
- cd tests
- docker-compose up -d
- sleep 60
- docker-compose logs
- docker-compose exec -T relay cat /var/lib/tor/fingerprint