From 45fe0f595d972c18ed4d18215d2b639665137a83 Mon Sep 17 00:00:00 2001 From: Jack Ivanov <17044561+jackivanov@users.noreply.github.com> Date: Thu, 16 Mar 2023 20:52:25 -0400 Subject: [PATCH] change dockerhub docs references --- algo-docker.sh | 2 +- docs/deploy-from-docker.md | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/algo-docker.sh b/algo-docker.sh index 3ec5881..62c6ccf 100644 --- a/algo-docker.sh +++ b/algo-docker.sh @@ -11,7 +11,7 @@ usage() { retcode="${1:-0}" echo "To run algo from Docker:" echo "" - echo "docker run --cap-drop=all -it -v :"${DATA_DIR}" trailofbits/algo:latest" + echo "docker run --cap-drop=all -it -v :"${DATA_DIR}" ghcr.io/trailofbits/algo:latest" echo "" exit ${retcode} } diff --git a/docs/deploy-from-docker.md b/docs/deploy-from-docker.md index 34f7bb2..523ab9f 100644 --- a/docs/deploy-from-docker.md +++ b/docs/deploy-from-docker.md @@ -13,28 +13,36 @@ While it is not possible to run your Algo server from within a Docker container, 2. Create a local directory to hold your VPN configs (e.g. `C:\Users\trailofbits\Documents\VPNs\`) 3. Create a local copy of [config.cfg](https://github.com/trailofbits/algo/blob/master/config.cfg), with required modifications (e.g. `C:\Users\trailofbits\Documents\VPNs\config.cfg`) 4. Run the Docker container, mounting your configurations appropriately (assuming the container is named `trailofbits/algo` with a tag `latest`): - - From Windows: + +- From Windows: + ```powershell C:\Users\trailofbits> docker run --cap-drop=all -it \ -v C:\Users\trailofbits\Documents\VPNs:/data \ - trailofbits/algo:latest + ghcr.io/trailofbits/algo:latest ``` - - From Linux: + +- From Linux: + ```bash $ docker run --cap-drop=all -it \ -v /home/trailofbits/Documents/VPNs:/data \ - trailofbits/algo:latest + ghcr.io/trailofbits/algo:latest ``` + 5. When it exits, you'll be left with a fully populated `configs` directory, containing all appropriate configuration data for your clients, and for future server management ### Providing Additional Files + If you need to provide additional files -- like authorization files for Google Cloud Project -- you can simply specify an additional `-v` parameter, and provide the appropriate path when prompted by `algo`. For example, you can specify `-v C:\Users\trailofbits\Documents\VPNs\gce_auth.json:/algo/gce_auth.json`, making the local path to your credentials JSON file `/algo/gce_auth.json`. ### Scripted deployment + Ansible variables (see [Deployment from Ansible](deploy-from-ansible.md)) can be passed via `ALGO_ARGS` environment variable. _The leading `-e` (or `--extra-vars`) is required_, e.g. + ```bash $ ALGO_ARGS="-e provider=digitalocean @@ -50,7 +58,7 @@ $ ALGO_ARGS="-e $ docker run --cap-drop=all -it \ -e "ALGO_ARGS=$ALGO_ARGS" \ -v /home/trailofbits/Documents/VPNs:/data \ - trailofbits/algo:latest + ghcr.io/trailofbits/algo:latest ``` ## Managing an Algo Server with Docker @@ -58,11 +66,12 @@ $ docker run --cap-drop=all -it \ Even though the container itself is transient, because you've persisted the configuration data, you can use the same Docker image to manage your Algo server. This is done by setting the environment variable `ALGO_ARGS`. If you want to use Algo to update the users on an existing server, specify `-e "ALGO_ARGS=update-users"` in your `docker run` command: + ```powershell $ docker run --cap-drop=all -it \ -e "ALGO_ARGS=update-users" \ -v C:\Users\trailofbits\Documents\VPNs:/data \ - trailofbits/algo:latest + ghcr.io/trailofbits/algo:latest ``` ## GNU Makefile for Docker