mirror of
https://github.com/casjaysdevdocker/tor
synced 2026-06-24 14:01:07 -04:00
f4df3572d5
Three fixes in this commit:
1. printf '%q' empty-variable bug — all 7 init.d service scripts:
printf '%q ' $su_exec/\$args/\$extra_env with an unset/empty variable
calls printf with no vararg, causing bash to format the empty string
as '' (two single-quotes), which gets written into the generated exec
script and makes the container fail to start. Fixed with ${var:+...}
parameter expansion so an empty variable produces an empty string.
2. Dockerfile — sync to template 202605261603 (structural changes:
blank line after $SHELL_OPTS in apk-repos block, un-indented echo ""
in Custom Settings and Custom Applications stubs); preserve all
tor-specific values (IMAGE_NAME, PHP_SERVER, BUILD_DATE, SERVICE_PORT,
EXPOSE_PORTS, PHP_VERSION, IMAGE_REPO, CONTAINER_VERSION, PULL_URL,
PACK_LIST, HOSTNAME, OCI labels).
3. README.md — add the full EXPOSE_PORTS list to the docker run command
and docker-compose ports section (privoxy 8118, SOCKS5 9050, DNS 9053
TCP+UDP, web 9080, bridge range 57000-57007).
- Dockerfile: sync structural template changes; update BUILD_DATE to 202605261603
- README.md: add -p 8118:8118 9050:9050 9053:9053 9053/udp 9080:9080 57000-57007 ports
- rootfs/usr/local/etc/docker/init.d/01-tor-server.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/09-unbound.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/98-privoxy.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: fix _q_su/_q_args/_q_extra printf %q guard
Dockerfile
README.md
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
92 lines
2.0 KiB
Markdown
92 lines
2.0 KiB
Markdown
## 👋 Welcome to tor 🚀
|
|
|
|
tor README
|
|
|
|
|
|
## Install my system scripts
|
|
|
|
```shell
|
|
sudo bash -c "$(curl -q -LSsf "https://github.com/systemmgr/installer/raw/main/install.sh")"
|
|
sudo systemmgr --config && sudo systemmgr install scripts
|
|
```
|
|
|
|
## Automatic install/update
|
|
|
|
```shell
|
|
dockermgr update tor
|
|
```
|
|
|
|
## Install and run container
|
|
|
|
```shell
|
|
dockerHome="/var/lib/srv/$USER/docker/casjaysdevdocker/tor/latest/volumes"
|
|
mkdir -p "$dockerHome"
|
|
git clone "https://github.com/dockermgr/tor" "$HOME/.local/share/CasjaysDev/dockermgr/tor"
|
|
cp -Rfva "$HOME/.local/share/CasjaysDev/dockermgr/tor/volumes/." "$dockerHome/"
|
|
docker run -d \
|
|
--restart always \
|
|
--privileged \
|
|
--name casjaysdevdocker-tor-latest \
|
|
--hostname tor \
|
|
-e TZ=${TIMEZONE:-America/New_York} \
|
|
-v "$dockerHome/data:/data:z" \
|
|
-v "$dockerHome/config:/config:z" \
|
|
-p 80:80 \
|
|
-p 8118:8118 \
|
|
-p 9050:9050 \
|
|
-p 9053:9053 \
|
|
-p 9053:9053/udp \
|
|
-p 9080:9080 \
|
|
-p 57000-57007:57000-57007 \
|
|
casjaysdevdocker/tor:latest
|
|
```
|
|
|
|
## via docker-compose
|
|
|
|
```yaml
|
|
services:
|
|
ProjectName:
|
|
image: casjaysdevdocker/tor
|
|
container_name: casjaysdevdocker-tor
|
|
environment:
|
|
- TZ=America/New_York
|
|
- HOSTNAME=tor
|
|
volumes:
|
|
- "/var/lib/srv/$USER/docker/casjaysdevdocker/tor/latest/volumes/data:/data:z"
|
|
- "/var/lib/srv/$USER/docker/casjaysdevdocker/tor/latest/volumes/config:/config:z"
|
|
ports:
|
|
- 80:80
|
|
- 8118:8118
|
|
- 9050:9050
|
|
- 9053:9053
|
|
- 9053:9053/udp
|
|
- 9080:9080
|
|
- 57000-57007:57000-57007
|
|
restart: always
|
|
```
|
|
|
|
## Get source files
|
|
|
|
```shell
|
|
dockermgr download src casjaysdevdocker/tor
|
|
```
|
|
|
|
OR
|
|
|
|
```shell
|
|
git clone "https://github.com/casjaysdevdocker/tor" "$HOME/Projects/github/casjaysdevdocker/tor"
|
|
```
|
|
|
|
## Build container
|
|
|
|
```shell
|
|
cd "$HOME/Projects/github/casjaysdevdocker/tor"
|
|
buildx
|
|
```
|
|
|
|
## Authors
|
|
|
|
🤖 casjay: [Github](https://github.com/casjay) 🤖
|
|
⛵ casjaysdevdocker: [Github](https://github.com/casjaysdevdocker) [Docker](https://hub.docker.com/u/casjaysdevdocker) ⛵
|
|
|