Skip to content

Commit 00fd6be

Browse files
committed
Docker invocations need mapped volume
So prefs can be persisted. Add a `debug platform` command.
1 parent 9489e48 commit 00fd6be

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ docker-run-version:
7272
@docker run -it webhookdb-cli version --time
7373

7474
docker-run-%:
75-
@docker run -it webhookdb-cli $(*)
75+
@docker run -v ~/.webhookdb/dockercli:/root -it webhookdb-cli $(*)
7676

7777
dockerhub-run-version:
7878
@docker run -it webhookdb/webhookdb-cli:latest version --time

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ so you have immediate, reliable access to all your data.
1818

1919
## Installing
2020

21-
Use the docker container:
21+
Use the docker container (note you need to mount `/root` to persist auth info between invocations):
2222

2323
```
2424
$ docker run -it webhookdb/webhookdb-cli:latest version
2525
0.13.0 (acb64d0f)
26+
$ docker run -v ~/.webhookdb/dockercli:/root -it webhookdb/webhookdb-cli:latest auth login
2627
```
2728

2829
On MacOS, install from Homebrew:

cmd/cmd_debug.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ var debugCmd = &cli.Command{
7474
return nil
7575
}),
7676
},
77+
{
78+
Name: "platform",
79+
Usage: "Print out information about the current platform.",
80+
Action: cliAction(func(c *cli.Context, ac appcontext.AppContext, ctx context.Context) error {
81+
home, err := ac.FS.UserHomeDir()
82+
if err != nil {
83+
home = fmt.Sprintf("error: %s", err)
84+
}
85+
fmt.Fprintf(c.App.Writer, "Home: %s\n", home)
86+
return nil
87+
}),
88+
},
7789
{
7890
Name: "update-auth-display",
7991
Usage: "Used to update the WASM terminal on startup.",

0 commit comments

Comments
 (0)