Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-06-06 17:06:54 -04:00
parent 8c8794fa3d
commit efd9d2557e
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
3 changed files with 12 additions and 9 deletions

View File

@ -20,6 +20,7 @@ FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>" LABEL maintainer "Jessie Frazelle <jess@linux.com>"
RUN apk --no-cache add \ RUN apk --no-cache add \
bash \
tor tor
# default port to used for incoming Tor connections # default port to used for incoming Tor connections

View File

@ -1,12 +1,14 @@
#!/bin/sh #!/bin/bash
set -e
set -o pipefail
for relaytype in bridge middle exit; do for relaytype in bridge middle exit; do
sed -i 's/${RELAY_NICKNAME}/'"$RELAY_NICKNAME"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${RELAY_NICKNAME}/'"$RELAY_NICKNAME"'/g' "/etc/tor/torrc.$relaytype"
sed -i 's/${CONTACT_GPG_FINGERPRINT}/'"$CONTACT_GPG_FINGERPRINT"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${CONTACT_GPG_FINGERPRINT}/'"$CONTACT_GPG_FINGERPRINT"'/g' "/etc/tor/torrc.$relaytype"
sed -i 's/${CONTACT_NAME}/'"$CONTACT_NAME"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${CONTACT_NAME}/'"$CONTACT_NAME"'/g' "/etc/tor/torrc.$relaytype"
sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype"
sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype"
sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype" sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype"
done done
tor -f /etc/tor/torrc.${RELAY_TYPE} exec tor -f /etc/tor/torrc.${RELAY_TYPE}

View File

@ -49,7 +49,7 @@ RUN apt-get update && apt-get -y install \
libxrender1 \ libxrender1 \
libxss1 \ libxss1 \
libxtst6 \ libxtst6 \
openssh-client \ openssh-client \
--no-install-recommends \ --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*