docker – Rev 69

Subversion Repositories:
Rev:
FROM debian:stable-slim
MAINTAINER Wizardry and Steamworks <wizardry.steamworks@outlook.com>

# update package manager
RUN  apt-get update -y && \
     apt-get upgrade -y && \
     apt-get dist-upgrade -y && \
     apt-get -y autoremove && \
     apt-get clean

# install required packages
RUN apt-get install -y \
    expect \
    telnet \
    coreutils \
    bash \
    curl \
    git \
    build-essential \
    autoconf \
    automake \
    libtool \
    pkgconf \
    libevent-dev \
    libssl-dev \
    libzstd-dev \
    liblzma-dev \
    zlib1g \
    zlib1g-dev \
    supervisor \
    libssl-dev \
    libicu-dev \
    unzip

RUN mkdir -p /tmp/kitchen
WORKDIR /tmp/kitchen

# install the latest golang
RUN curl -fsSL "https://go.dev/dl/$(curl -s 'https://go.dev/VERSION?m=text' | head -1).linux-amd64.tar.gz" -o go.tar.gz && \
    tar -xzf go.tar.gz && \
    rm go.tar.gz && \
    git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git && \
    cd /tmp/kitchen/snowflake/client && \
    /tmp/kitchen/go/bin/go build && \
    mkdir -p /usr/local/bin && \
    cp client /usr/local/bin/snowflake-client

# compile the latest tor
WORKDIR /tmp/kitchen
RUN git clone https://gitlab.torproject.org/tpo/core/tor.git && \
    cd /tmp/kitchen/tor && \
    ./autogen.sh && \
    ./configure \
        --enable-lzma \
        --enable-zstd \
        --disable-gcc-hardening \
        --disable-linker-hardening \
        --disable-manpage \
        --disable-html-manual \
        --disable-asciidoc \
        --disable-unittests && \
    make -j4 && \
    mkdir -p /usr/local/bin && \
    cp /tmp/kitchen/tor/src/app/tor /usr/local/bin/
    
# install checkcircuit
WORKDIR /tmp/kitchen
RUN curl -fsSL https://checkcircuit.grimore.org/download/linux-x64/CheckCircuit-1.0.33.4-linux-x64.zip -o checkcircuit.zip && \
    unzip checkcircuit.zip && \
    mv CheckCircuit /usr/local/bin/

# pivot out and remove the kitchen
WORKDIR /
RUN rm -rf /tmp/kitchen

# include root filesystem
ADD rootfs /

# remove packages that will not be used
RUN apt-get purge -y \
        curl \
        git \
        build-essential \
        autoconf \
        automake \
        libtool \
        pkgconf && \
    apt-get autoremove -y 

# tor required port
EXPOSE 9050 7050 9053

# specify the entry point
RUN chmod +x /usr/local/bin/run
ENTRYPOINT [ "/usr/local/bin/run" ]