github.com/astaguna/popon-core@v0.0.0-20231019235610-96e42d76a5ff/ConsoleClient/README.md (about) 1 ## Psiphon Console Client README 2 3 ### Building with Docker 4 5 Note that you may need to use `sudo docker` below, depending on your OS. 6 7 ##### Create the build image: 8 9 1. While in the `ConsoleClient` directory, run the command: `docker build --no-cache=true -t psiclient .` 10 11 2. Once completed, verify that you see an image named `psiclient` when running: `docker images` 12 13 ##### Run the build: 14 15 *Ensure that the command below is run from within the `ConsoleClient` directory* 16 17 *The `--user "$(id -u):$(id -g)"` flag must be omitted when building on macOS because manually specifying the UID/GID will cause the build to fail since Docker on macOS handles host to container UID/GID mapping automatically and will be unable to map the manually specified UID/GID to the current user.* 18 19 ```bash 20 cd .. && \ 21 docker run \ 22 --platform=linux/amd64 \ 23 --user "$(id -u):$(id -g)" \ 24 --rm \ 25 -v $PWD:/go/src/github.com/astaguna/popon-core \ 26 psiclient \ 27 /bin/bash -c './make.bash all' \ 28 ; cd - 29 ``` 30 31 This command can also be modified by: 32 - replacing `all` with `windows`, `linux`, or `osx` as the first parameter to `make.bash` (as in `...&& ./make.bash windows`) to only build binaries for the operating system of choice 33 - if `windows` or `linux` is specified as the first parameter, the second parameter can be passed as either `32` or `64` (as in `...&& ./make.bash windows 32`)to limit the builds to just one or the other (no second parameter means both will build) 34 35 When that command completes, the compiled binaries will be located in the `bin` directory (`./bin`, and everything under it will likely be owned by root, so be sure to `chown` to an appropriate user) under the current directory. The structure will be: 36 37 ``` 38 bin 39 ├── darwin 40 │ └── psiphon-tunnel-core-x86_64 41 ├── linux 42 │ └── psiphon-tunnel-core-i686 43 │ └── psiphon-tunnel-core-x86_64 44 └── windows 45 └── psiphon-tunnel-core-i686.exe 46 └── psiphon-tunnel-core-x86_64.exe 47 48 ```