Docker image for Psiphon
Psiphon is an Internet censorship circumvention system.
This docker image runs the ConsoleClient from the psiphon-tunnel-core.
This build uses
docker buildx
plugin withdocker-container
driver.
Docker image available at swarupsengupta2007/psiphon.
This is built on base image from swarupsengupta2007/apine-s6-docker
# Clone this repo
git clone https://github.com/swarupsengupta2007/psiphon-docker
- Ensure buildx is enabled for docker
- Create a builder instance for multi-arch
- Build docker image for current platform or multi-arch
# choose target platforms
TARGETS="linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6"
# Create a builder instance if it doesn't exist
docker buildx create --name cross-platform --platform ${TARGETS} --use
# Build for current platform and load to docker image
docker buildx build -t <your_tag> . --load
# build for multi-arch and push to registry
docker buildx build --build-arg TARGETS=${TARGETS} -t <your_username>/<your_tag> \
--platform ${TARGETS} . --push
Or use the helper script make.bash as follows
# optional, choose targets (defaults to the following list)
export TARGETS="linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6"
# optional, choose psiphon version (defaults to the lastest committed docker image)
export VERSION=2.0.30
# optional, choose go version (currently 1.20)
export GO_VERSION=1.20
# run the script
./make.bash
Build-args available
build-arg | default | Description |
---|---|---|
VERSION | 2.0.23 | psiphon-tunnel-core release version |
TARGETS | <BUIDLOS>/<BUILDARCH> | Targets for cross-compilation for the build stage |
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
docker run -d \
--name psiphon \
--restart=unless-stopped \
-p 8080:8080 \
-p 1080:1080 \
-v /home/swarup/psiphon/config/:/config \
swarupsengupta2007/psiphon
The following Environment var are available
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 |