Files
psiphon-docker/README.md
T

80 lines
2.2 KiB
Markdown
Raw Normal View History

2022-06-15 00:59:52 +05:30
# Psiphon Docker
2022-06-14 18:58:34 +05:30
Docker image for Psiphon
2022-06-15 00:59:52 +05:30
Psiphon is an Internet censorship circumvention system. <br>
This docker image runs the ConsoleClient from the [psiphon-tunnel-core](https://github.com/Psiphon-Labs/psiphon-tunnel-core "psiphon-tunnel-core").
This build uses `docker buildx` plugin with `docker-container` driver.
2022-06-15 11:29:57 +05:30
```bash
2022-06-15 01:12:15 +05:30
# Clone this repo
git clone https://github.com/swarupsengupta2007/psiphon-docker
```
2022-06-15 11:26:29 +05:30
# Building<br>
2022-06-15 00:59:52 +05:30
1. Ensure buildx is enabled for docker
2. Create a builder instance for multi-arch
3. Build docker image for current platform or multi-arch
2022-06-15 11:29:57 +05:30
```bash
2022-06-15 00:59:52 +05:30
# choose target platforms
TARGETS="linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6"
2022-06-15 00:59:52 +05:30
# Create a builder instance
2022-06-15 01:19:20 +05:30
sudo docker buildx create --name cross-platform --platform ${TARGETS} --use
2022-06-15 00:59:52 +05:30
# Build for current platform and load to docker image
2022-06-16 23:41:19 +05:30
sudo docker buildx build -t <your_tag> . --load
2022-06-15 00:59:52 +05:30
# Build for multi-arch and push to registry
2022-06-15 11:15:33 +05:30
sudo docker buildx build --build-arg TARGETS=${TARGETS} -t <your_username>/<your_tag> \
2022-06-15 01:20:59 +05:30
--platform ${TARGETS} . --push
2022-06-15 00:59:52 +05:30
```
2022-06-15 11:15:33 +05:30
> To change the version of the psiphon add --build-arg VERSION=<version_no><br>
e.g.
2022-06-15 11:29:57 +05:30
```bash
2022-06-15 11:15:33 +05:30
# to build v2.0.22
2022-06-16 23:42:28 +05:30
sudo docker buildx build --build-arg VERSION=2.0.22 -t <your_tag> . --load
2022-06-15 11:15:33 +05:30
```
2022-06-15 11:26:29 +05:30
# Usage
2022-06-15 00:59:52 +05:30
2022-06-15 11:28:02 +05:30
## Using docker-compose (recommended) <br>
2022-06-15 01:24:32 +05:30
```yaml
2022-06-15 00:59:52 +05:30
version: "3.5"
services:
psiphon:
image: swarupsengupta2007/psiphon:latest
container_name: psiphon
environment:
- PUID=1000
- PGID=1000
volumes:
- /path/to/psiphon/config:/config
ports:
- 1080:1080
- 8080:8080
restart: unless-stopped
```
2022-06-15 11:28:02 +05:30
## Using docker-cli <br>
2022-06-15 11:29:57 +05:30
```bash
2022-06-16 23:38:51 +05:30
sudo docker run --name psiphon -d -p 8080:8080 -p 1080:1080 \
-v /home/swarup/psiphon/config/:/config swarupsengupta2007/psiphon
2022-06-15 11:29:57 +05:30
```
2022-06-15 00:59:52 +05:30
2022-06-15 11:28:02 +05:30
The following Environment var are available<br>
2022-06-15 00:59:52 +05:30
|ENV variable|Description|Default|
|--|--|--|
|PUID|The UID for psiphon process|1000|
|PGID|The GID for psiphon process|1000|
Following ports and volumes are available
|Option|switch|Description|Default|
|--|--|--|--|
|HTTP PORT|-p host_port:8080|http proxy port|8080|
|SOCKS PORT|-p host_port:1080|socks proxy port|1080|
|VOLUME|-v /path/to/config:/config|The container storage|/config|