From e241e7cfe5c20a39268475278e7b6a63fd245350 Mon Sep 17 00:00:00 2001 From: Dave Kaminski Date: Fri, 31 Jul 2020 12:47:40 -0700 Subject: [PATCH] (+semver: patch) Add kvetchctl to docker image (#9) Also fix up the docs. --- Dockerfile | 1 + README.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7ecaf64..5b1c160 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,5 +42,6 @@ FROM ubuntu:18.04 as final ENV GOMAXPROCS 128 EXPOSE 7777 WORKDIR /app +COPY --from=0 /artifacts/linux/kvetchctl /app/ COPY --from=0 /build/kvetch /app/ CMD ["/app/kvetch"] diff --git a/README.md b/README.md index 7cfa899..638382c 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,13 @@ Kvetch is a small gRPC wrapper around the [Badger](https://github.com/dgraph-io/ Run the Kvetch container in Docker: ```bash -docker run --rm -v $PWD/data:/data -e DATASTORE=/data -p 7777:7777 syncromatics/kvetch:0.4.0 +docker run --rm -v $PWD/data:/data -e DATASTORE=/data -p 7777:7777 syncromatics/kvetch:v0.5.1 ``` Interact with Kvetch using `kvetchctl`: ```bash +GO111MODULE=on go get github.com/syncromatics/kvetch/cmd/kvetchctl@v0.5.1 export KVETCHCTL_ENDPOINT=localhost:7777 # host:port of Kvetch instance kvetchctl set example/1 "first value" kvetchctl set example/2 "second value" @@ -20,6 +21,18 @@ kvetchctl set example/3 "third value" kvetchctl get --prefix example/ ``` +It is also possible to run both `kvetch` and `kvetchctl` in the same docker container: + +```bash +docker run -it --rm syncromatics/kvetch:v0.5.1 bash +DATASTORE=/data ./kvetch & +export KVETCHCTL_ENDPOINT=localhost:7777 +./kvetchctl set example/1 "first value" +./kvetchctl set example/2 "second value" +./kvetchctl set example/3 "third value" +./kvetchctl get --prefix example/ +``` + More `kvetchctl` documentation is available in [docs/kvetchctl](docs/kvetchctl/kvetchctl.md) ## Building