Open Laserlicht opened 5 years ago
Docker Hub haven't support arm arch for automated builds, currently, so we'll need to have a separated Docker Hub Repository for that, and build the image with other platforms, I'm not sure how many Raspberry Pi users need the arm build of this repository, +1 on this issue if you're a Raspberry Pi or other arm platform users need this.
Looks like currently not so many Raspberry Pi users here, so I may not manually build images for it and manually upload to Docker Hub, but keep waiting for more convenient or official ways.
If you'd like to use it on Raspberry Pi currently, I suggest you to build it locally, just need a very tiny patch of the Dockerfile. Assume you are using Raspberry Pi 2+, add arm32v7/
prefix to the FROM
command, like this:
-FROM alpine:3.10
+FROM arm32v7/alpine:3.10
Now you can build it as normal, for example:
docker build -t tor-socks-proxy:local-arm32v7 .
You should replace arm32v7
with arm32v6
if you're using Raspberry Pi 1, or replace it with arm64v8
if you're running an ARM64 operating system on Raspberry Pi 3+, it should work.
As https://github.com/docker/hub-feedback/issues/1261 has been fixed it is now possible to do automatically build for ARM on Docker Hub.
@hacker-h thanks! I'll take a look.
replace it with
arm64v8
if you're running an ARM64 operating system on Raspberry Pi 3+, it should work
For me works only arm32v7, but I write alpine:latest
Awesome, works with two commands, execute on Pi:
docker build https://github.com/b1oki/tor-socks-proxy.git#master -t tor-socks-proxy:local-arm32v7
docker run -d --restart=always --name tor-socks-proxy -p 127.0.0.1:9150:9150 tor-socks-proxy:local-arm32v7
After upgrade Raspbian
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
$ uname -a
Linux raspberrypi 5.4.72-v7+ armv7l GNU/Linux
$ docker build --no-cache https://github.com/b1oki/tor-socks-proxy.git#arm -t tor-socks-proxy:local-arm32v7
Step 10/14 : RUN tor --version
---> Running in 8d09cdebcc32
Error relocating /usr/bin/tor: __localtime64_r: symbol not found
Error relocating /usr/bin/tor: __mktime64: symbol not found
Error relocating /usr/bin/tor: __stat_time64: symbol not found
Error relocating /usr/bin/tor: __fstat_time64: symbol not found
Error relocating /usr/bin/tor: __gettimeofday_time64: symbol not found
Error relocating /usr/bin/tor: __utime64: symbol not found
Error relocating /usr/bin/tor: __clock_gettime64: symbol not found
Error relocating /usr/bin/tor: __gmtime64_r: symbol not found
Error relocating /usr/bin/tor: __time64: symbol not found
Error relocating /usr/bin/tor: __pthread_cond_timedwait_time64: symbol not found
The command '/bin/sh -c tor --version' returned a non-zero code: 127
Problem with tor@edge, so I remove edge.
@b1oki Thanks for sharing
Hi @Laserlicht @hacker-h @b1oki,
I forgot to update some news here, would you like to use this image and see if it works for you: peterdavehello/tor-socks-proxy:test
? Thanks.
pi@raspberrypi:~ $ docker run -it peterdavehello/tor-socks-proxy:test
pi@raspberrypi:~ $
doesn't work for me on Pi4: Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
manual run with a shell within the container:
$ /usr/bin/tor -f /etc/tor/torrc
Aborted
@hacker-h okay, thanks, I'll arrange some free time to take a look.
@PeterDaveHello
pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy-test -p 0.0.0.0:9100:9150 -it peterdavehello/tor-socks-proxy:test
Statuses:
Restarting (132) 2 seconds ago
Up Less than a second (health: starting)
Restarting (132) 25 seconds ago
pi@raspberrypi:~ $ docker run --name tor-socks-proxy-test --entrypoint=sh -p 0.0.0.0:9100:9150 -it peterdavehello/tor-socks-proxy:test
/ $ /usr/bin/tor -f /etc/tor/torrc
Aborted
/ $ echo $?
134
/ $ /usr/bin/tor
Aborted
/ $ echo $?
134
Custom branch tor-socks-proxy:local-arm32v7 is worked okey.
After upgrade OS to Raspbian GNU/Linux 11 (bullseye) and 5.15.79-v7+ kernel successful run with arm32v7/alpine:3.17
Just pushed some updates here: https://hub.docker.com/r/peterdavehello/tor-socks-proxy/tags
For the latest tag, it's for linux/amd64
and linux/arm/v7
only right now, as you can see in #34, the obfs4proxy
package is not available for Alpine Linux armhf/aarch64
architect.
So, I manually build another image without the obfs4proxy
package here, tagged with test
, for these platforms:
linux/arm/v6
linux/arm/v7
linux/arm64
Please feel free to give it a try and share some feedback, thanks!
Thank you!
pi@raspberrypi:~ $ docker container stop tor-socks-proxy && docker container rm tor-socks-proxy
pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy -p 0.0.0.0:9100:9150/tcp peterdavehello/tor-socks-proxy:latest
Unable to find image 'peterdavehello/tor-socks-proxy:latest' locally
latest: Pulling from peterdavehello/tor-socks-proxy
31e352740f53: Pull complete
812d47cf69da: Pull complete
c15e9ad74a07: Pull complete
Digest: sha256:607562b7863dc8f42b961b6e7d253d8365f6688bc58cabd32c2afc6e05dc7163
Status: Downloaded newer image for peterdavehello/tor-socks-proxy:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
186a5a9fb95526344c48b809ba1cbf0fbdff29a329c94b83c8f6feeecf34cbcc
pi@raspberrypi:~ $ docker container stop tor-socks-proxy && docker container rm tor-socks-proxy
tor-socks-proxy
tor-socks-proxy
pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy -p 0.0.0.0:9100:9150/tcp peterdavehello/tor-socks-proxy:test
7a508c5ea843bda38657c452239a4a5310f964b831bebb3a5cbb26d03079b309
pi@raspberrypi:~ $ docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7a508c5ea843 peterdavehello/tor-socks-proxy:test "/usr/bin/tor -f /et…" 7 seconds ago Up 4 seconds (health: starting) 8853/udp, 0.0.0.0:9100->9150/tcp tor-socks-proxy
pi@raspberrypi:~ $ docker logs tor-socks-proxy -f
Jul 27 13:47:02.540 [notice] Tor 0.4.7.13 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.1.0, Zlib 1.2.13, Liblzma 5.4.3, Libzstd 1.5.5 and Unknown N/A as libc.
Jul 27 13:47:02.540 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Jul 27 13:47:02.541 [notice] Read configuration file "/etc/tor/torrc".
Jul 27 13:47:02.556 [warn] You specified a public address '0.0.0.0:8853' for DNSPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.569 [warn] You specified a public address '0.0.0.0:9150' for SocksPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.569 [warn] You specified a public address '0.0.0.0:8853' for DNSPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.570 [notice] Opening Socks listener on 0.0.0.0:9150
Jul 27 13:47:02.570 [notice] Opened Socks listener connection (ready) on 0.0.0.0:9150
Jul 27 13:47:02.571 [notice] Opening DNS listener on 0.0.0.0:8853
Jul 27 13:47:02.571 [notice] Opened DNS listener connection (ready) on 0.0.0.0:8853
Jul 27 13:47:02.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Jul 27 13:47:03.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Jul 27 13:47:06.000 [notice] Bootstrapped 0% (starting): Starting
Jul 27 13:47:06.000 [notice] Starting with guard context "default"
Jul 27 13:47:07.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
pi@raspberrypi:~ $ docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7a508c5ea843 peterdavehello/tor-socks-proxy:test "/usr/bin/tor -f /et…" 2 minutes ago Up 2 minutes (health: starting) 8853/udp, 0.0.0.0:9100->9150/tcp tor-socks-proxy
See also #56
sudo docker logs tor_socks_proxy
returnsstandard_init_linux.go:190: exec user process caused "exec format error"