You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deploy-from-docker.md
+15-6Lines changed: 15 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -13,28 +13,36 @@ While it is not possible to run your Algo server from within a Docker container,
13
13
2. Create a local directory to hold your VPN configs (e.g. `C:\Users\trailofbits\Documents\VPNs\`)
14
14
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`)
15
15
4. Run the Docker container, mounting your configurations appropriately (assuming the container is named `trailofbits/algo` with a tag `latest`):
16
-
- From Windows:
16
+
17
+
- From Windows:
18
+
17
19
```powershell
18
20
C:\Users\trailofbits> docker run --cap-drop=all -it \
19
21
-v C:\Users\trailofbits\Documents\VPNs:/data \
20
-
trailofbits/algo:latest
22
+
ghcr.io/trailofbits/algo:latest
21
23
```
22
-
- From Linux:
24
+
25
+
- From Linux:
26
+
23
27
```bash
24
28
$ docker run --cap-drop=all -it \
25
29
-v /home/trailofbits/Documents/VPNs:/data \
26
-
trailofbits/algo:latest
30
+
ghcr.io/trailofbits/algo:latest
27
31
```
32
+
28
33
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
29
34
30
35
### Providing Additional Files
36
+
31
37
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`.
32
38
33
39
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`.
34
40
35
41
### Scripted deployment
42
+
36
43
Ansible variables (see [Deployment from Ansible](deploy-from-ansible.md)) can be passed via `ALGO_ARGS` environment variable.
37
44
_The leading `-e` (or `--extra-vars`) is required_, e.g.
45
+
38
46
```bash
39
47
$ ALGO_ARGS="-e
40
48
provider=digitalocean
@@ -50,19 +58,20 @@ $ ALGO_ARGS="-e
50
58
$ docker run --cap-drop=all -it \
51
59
-e "ALGO_ARGS=$ALGO_ARGS" \
52
60
-v /home/trailofbits/Documents/VPNs:/data \
53
-
trailofbits/algo:latest
61
+
ghcr.io/trailofbits/algo:latest
54
62
```
55
63
56
64
## Managing an Algo Server with Docker
57
65
58
66
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`.
59
67
60
68
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:
0 commit comments