Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tor version to 0.4.8.7 #6

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG ALPINE_VERSION="3.17.3"
ARG ALPINE_VERSION="3.18.4"

# Tor builder
FROM --platform=$TARGETPLATFORM docker.io/library/alpine:$ALPINE_VERSION as tor-builder

ARG TOR_VERSION="0.4.7.13"
ARG TOR_VERSION="0.4.8.7"
RUN apk add --update --no-cache \
git build-base automake autoconf make \
build-base openssl-dev libevent-dev zlib-dev \
Expand All @@ -13,10 +13,14 @@ RUN apk add --update --no-cache \
RUN git clone https://gitlab.torproject.org/tpo/core/tor.git --depth 1 --branch tor-$TOR_VERSION /tor
WORKDIR /tor
RUN ./autogen.sh

# Notes:
# - --enable-gpl is required to compile PoW anti-DoS: https://community.torproject.org/onion-services/advanced/dos/
RUN ./configure \
--disable-asciidoc \
--disable-manpage \
--disable-html-manual
--disable-html-manual \
--enable-gpl
# --enable-static-tor
RUN make
RUN make install
Expand Down Expand Up @@ -44,8 +48,11 @@ LABEL \

WORKDIR /app

RUN apk add --update --no-cache libevent && \
chmod -R g+w /app /run
RUN apk add --update --no-cache \
libevent \
xz-libs \
zstd-libs \
&& chmod -R g+w /app /run

# install tor
RUN mkdir -p /usr/local/bin /usr/local/etc/tor /usr/local/share/tor
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.quick
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION="3.17.3"
ARG ALPINE_VERSION="3.18.4"

# Build the obfs4 binary (cross-compiling)
FROM --platform=$BUILDPLATFORM golang:1.20-alpine as obfs-builder
Expand All @@ -17,7 +17,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

# Tor runner
FROM --platform=$TARGETPLATFORM docker.io/library/alpine:$ALPINE_VERSION as runner
ARG TOR_VERSION="0.4.7.13"
ARG TOR_VERSION="0.4.8.7"

LABEL \
org.opencontainers.image.source "https://github.com/bugfest/tor-docker"
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
.PHONY: all
all: build

# Dockerfile.quick installs Tor using pre-built binaries
.PHONY: quick
build:
quick:
docker buildx build \
--platform=linux/amd64,linux/arm,linux/arm64 \
--build-arg ALPINE_VERSION=3.17.3 \
--build-arg TOR_VERSION=0.4.7.13 \
--tag quay.io/bugfest/tor:0.4.7.13 \
--build-arg TOR_VERSION=0.4.8.7 \
--tag quay.io/bugfest/tor:0.4.8.7 \
--tag quay.io/bugfest/tor:latest \
--squash \
-f Dockerfile.quick \
.

# Dockerfile builds Tor from source
.PHONY: build
build-alt:
build:
docker buildx build \
--platform=linux/amd64,linux/arm,linux/arm64 \
--build-arg ALPINE_VERSION=3.17.3 \
--build-arg TOR_VERSION=0.4.7.13 \
--tag quay.io/bugfest/tor:0.4.7.13 \
--build-arg TOR_VERSION=0.4.8.7 \
--tag quay.io/bugfest/tor:0.4.8.7 \
--tag quay.io/bugfest/tor:latest \
--squash \
-f Dockerfile \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ make

Installs pre-built Tor from Alpine's repositories. Useful for testing/troubleshooting.

WARNING: some Tor features might be missing, depending on the [Alpine community build setup](https://github.com/alpinelinux/aports/tree/master/community/tor)

```bash
make quick
```
Expand Down