diff --git a/tor-relay/Dockerfile b/tor-relay/Dockerfile index a7fa3e8..a28125b 100644 --- a/tor-relay/Dockerfile +++ b/tor-relay/Dockerfile @@ -20,6 +20,7 @@ FROM alpine:latest LABEL maintainer "Jessie Frazelle " RUN apk --no-cache add \ + bash \ tor # default port to used for incoming Tor connections diff --git a/tor-relay/run.sh b/tor-relay/run.sh index 40c98f6..f0b8efb 100644 --- a/tor-relay/run.sh +++ b/tor-relay/run.sh @@ -1,12 +1,14 @@ -#!/bin/sh +#!/bin/bash +set -e +set -o pipefail for relaytype in bridge middle exit; do - 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_NAME}/'"$CONTACT_NAME"'/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_BURST}/'"$RELAY_BANDWIDTH_BURST"'/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_NAME}/'"$CONTACT_NAME"'/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_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype" done -tor -f /etc/tor/torrc.${RELAY_TYPE} +exec tor -f /etc/tor/torrc.${RELAY_TYPE} diff --git a/vscode/Dockerfile b/vscode/Dockerfile index 99e5a5a..b4d1325 100644 --- a/vscode/Dockerfile +++ b/vscode/Dockerfile @@ -49,7 +49,7 @@ RUN apt-get update && apt-get -y install \ libxrender1 \ libxss1 \ libxtst6 \ - openssh-client \ + openssh-client \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/*