Due to performance issues, shared runners are currently unavailable. They should come back later today.

Verified Commit fc9d9244 authored by Sheogorath's avatar Sheogorath 🛫

Initial commit

parents
FROM alpine:3.8
ARG TOR_VERSION="0.3.5.7"
ARG TOR_HOME /var/lib/tor
RUN mkdir -p ${TOR_HOME}/.tor && \
addgroup -S -g 994 tor && \
adduser -S -G tor -u 994 -H -h ${TOR_HOME} tor
RUN apk add --no-cache --virtual .build-deps git libevent-dev openssl-dev gcc make automake ca-certificates autoconf musl-dev coreutils gnupg && \
apk add --no-cache --virtual .tor-deps libevent openssl &&\
mkdir -p /usr/local/src/ && \
cd /tmp && \
wget https://www.torproject.org/dist/tor-${TOR_VERSION}.tar.gz && \
wget https://www.torproject.org/dist/tor-${TOR_VERSION}.tar.gz.asc && \
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x6AFEE6D49E92B601 && \
echo "---" && \
gpg --verify /tmp/tor-${TOR_VERSION}.tar.gz.asc /tmp/tor-${TOR_VERSION}.tar.gz && \
tar -xvf /tmp/tor-${TOR_VERSION}.tar.gz -C /usr/local/src/ && \
cd /usr/local/src/tor-${TOR_VERSION} && \
./configure \
--disable-asciidoc \
--sysconfdir=/etc \
--with-tor-user=tor \
--with-tor-group=tor \
--disable-unittests && \
make -j "$(getconf _NPROCESSORS_ONLN)" && make install && \
cd /usr/local/src/ && \
rm -rf /usr/local/src/tor-${TOR_VERSION} && \
apk del --purge .build-deps
RUN mkdir -p /etc/tor/ /etc/torrc.d && \
mv /etc/tor/torrc.sample /etc/tor/torrc && \
sed -i 's/#%include \/etc\/torrc\.d\//%include \/etc\/torrc\.d\//' /etc/tor/torrc
USER tor
CMD ["tor"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment