From 31babe9f4514231917134cb881c9dae09835ebe0 Mon Sep 17 00:00:00 2001 From: Albatroz Jeremias Date: Fri, 2 Jul 2021 14:23:42 +0100 Subject: [PATCH 1/2] change google to debian, add docker-compose file --- Dockerfile | 4 ++-- docker-compose.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 6d7f97a..e912fef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # Use distroless as minimal base image to package the distrust binary # Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM gcr.io/distroless/static:nonroot +FROM debian:buster-slim WORKDIR / COPY distrust / -USER nonroot:nonroot +RUN useradd -ms /bin/bash nonroot EXPOSE 3000 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..224b35a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' +services: + distrust: + build: . + volumes: + - ./distrust.yml:/distrust.yml:ro + ports: + - "3000:3000" \ No newline at end of file From 74d3fefc193b2be27edb93742e180cad1af5e7c6 Mon Sep 17 00:00:00 2001 From: Albatroz Jeremias Date: Fri, 2 Jul 2021 14:30:15 +0100 Subject: [PATCH 2/2] update README with instructions on how-to use docker-compose --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index bc6a3f1..7a06ddc 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,10 @@ To run distrust, copy the `distrust.example.yml` file to `distrust.yml` and cust ./distrust ``` +## Installation You can also use a container engine like podman or docker to run distrust +### Running using podman ```sh podman run -d \ --name distrust \ @@ -22,6 +24,22 @@ podman run -d \ ghcr.io/parkour-vienna/distrust:$VERSION ``` +### Running using docker-compose + +Download a release + +```sh +export VERSION=0.0.5 +curl https://github.com/Parkour-Vienna/distrust/releases/download/v$VERSION/distrust_$VERSION_Linux_x86_64.tar.gz +tar zxvf distrust_$VERSION_Linux_x86_64.tar.gz +``` + +Build the image: `docker-compose build` + +Up and running: `docker-compose up` + +Generate a new key: `docker-compose exec distrust ./distrust genkey` + ## Configuration ### Configuring Discourse