From 1e1fd7ac4452fa140b9c2959de3944eb85ede5c9 Mon Sep 17 00:00:00 2001 From: David Herberth Date: Wed, 17 Sep 2025 09:03:06 +0200 Subject: [PATCH 1/3] fix(relay): Fix Relay docker commands, registry, nonroot --- docs/product/relay/getting-started.mdx | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/product/relay/getting-started.mdx b/docs/product/relay/getting-started.mdx index 1eddbe93d7565b..07e314f3da6ba9 100644 --- a/docs/product/relay/getting-started.mdx +++ b/docs/product/relay/getting-started.mdx @@ -9,7 +9,7 @@ Getting started with [Relay](/product/relay/) is as simple as using the default The Relay server is called `relay`. Download binaries from [GitHub -Releases](https://github.com/getsentry/relay/releases). A Docker image is provided on [DockerHub](https://hub.docker.com/r/getsentry/relay/). +Releases](https://github.com/getsentry/relay/releases). A Docker image is provided on the [Github Container Registry](https://github.com/getsentry/relay/pkgs/container/relay). @@ -33,15 +33,14 @@ container and copying in the files. # The :z option is only necessary on selinux. # See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label. docker run --rm -it \ - -v $(pwd)/config/:/work/.relay/:z \ - --entrypoint bash \ - getsentry/relay \ - -c 'chown -R relay:relay /work/.relay' + -v "$(pwd)/config/":/work/.relay:z \ + busybox \ + sh -c "chown -R 65532:65532 /work" \ # Generate the configuration -docker run --rm -it \ - -v $(pwd)/config/:/work/.relay/:z \ - getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/:z \ + ghcr.io/getsentry/relay \ config init ``` @@ -128,9 +127,9 @@ To register Relay with Sentry: 1. Copy the contents of the public key, either by inspecting the `credentials.json` file or by running: ```shell {tabTitle:Run in Docker} - docker run --rm -it \ - -v $(pwd)/config/:/work/.relay/ \ - getsentry/relay \ + docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/ \ + ghcr.io/getsentry/relay \ credentials show ``` @@ -154,10 +153,10 @@ This process registers Relay with Sentry so it is ready to send messages. See After registering Relay with Sentry, it is ready to run: ```shell {tabTitle:Run in Docker} -docker run --rm -it \ - -v $(pwd)/config/:/work/.relay/ \ - -p 3000:3000 \ - getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/ \ + -p 3000:3000 \ + ghcr.io/getsentry/relay \ run ``` @@ -181,10 +180,10 @@ Refer to the [Logging](../monitoring/#logging) page for more information on how If you moved your config folder (for example, for security reasons), use the `--config` option to specify the location: ```shell {tabTitle:Run in Docker} -docker run --rm -it \ - -v $(pwd)/config/:/etc/relay/ \ - -p 3000:3000 \ - getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/etc/relay/ \ + -p 3000:3000 \ + ghcr.io/getsentry/relay \ run --config /etc/relay/ ``` From 5a5eb66127a0f3c1b9ce945e9242bfb068784287 Mon Sep 17 00:00:00 2001 From: David Herberth Date: Wed, 17 Sep 2025 10:06:56 +0200 Subject: [PATCH 2/3] alignment --- docs/product/relay/getting-started.mdx | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/product/relay/getting-started.mdx b/docs/product/relay/getting-started.mdx index 07e314f3da6ba9..7e9fbd1889247f 100644 --- a/docs/product/relay/getting-started.mdx +++ b/docs/product/relay/getting-started.mdx @@ -32,15 +32,15 @@ container and copying in the files. # Adjust permissions for the configuration directory # The :z option is only necessary on selinux. # See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label. -docker run --rm -it \ - -v "$(pwd)/config/":/work/.relay:z \ - busybox \ - sh -c "chown -R 65532:65532 /work" \ +docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/:z \ + busybox \ + sh -c "chown -R 65532:65532 /work" \ # Generate the configuration -docker run --rm -it \ - -v "$(pwd)"/config/:/work/.relay/:z \ - ghcr.io/getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/:z \ + ghcr.io/getsentry/relay \ config init ``` @@ -127,9 +127,9 @@ To register Relay with Sentry: 1. Copy the contents of the public key, either by inspecting the `credentials.json` file or by running: ```shell {tabTitle:Run in Docker} - docker run --rm -it \ - -v "$(pwd)"/config/:/work/.relay/ \ - ghcr.io/getsentry/relay \ + docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/ \ + ghcr.io/getsentry/relay \ credentials show ``` @@ -153,10 +153,10 @@ This process registers Relay with Sentry so it is ready to send messages. See After registering Relay with Sentry, it is ready to run: ```shell {tabTitle:Run in Docker} -docker run --rm -it \ - -v "$(pwd)"/config/:/work/.relay/ \ - -p 3000:3000 \ - ghcr.io/getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/work/.relay/ \ + -p 3000:3000 \ + ghcr.io/getsentry/relay \ run ``` @@ -180,10 +180,10 @@ Refer to the [Logging](../monitoring/#logging) page for more information on how If you moved your config folder (for example, for security reasons), use the `--config` option to specify the location: ```shell {tabTitle:Run in Docker} -docker run --rm -it \ - -v "$(pwd)"/config/:/etc/relay/ \ - -p 3000:3000 \ - ghcr.io/getsentry/relay \ +docker run --rm -it \ + -v "$(pwd)"/config/:/etc/relay/ \ + -p 3000:3000 \ + ghcr.io/getsentry/relay \ run --config /etc/relay/ ``` From 35e4d30fe2ea53e399b015f23388f49bd8502ee5 Mon Sep 17 00:00:00 2001 From: David Herberth Date: Wed, 17 Sep 2025 10:35:58 +0200 Subject: [PATCH 3/3] just chown it --- docs/product/relay/getting-started.mdx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/product/relay/getting-started.mdx b/docs/product/relay/getting-started.mdx index 7e9fbd1889247f..bc18dfc095a855 100644 --- a/docs/product/relay/getting-started.mdx +++ b/docs/product/relay/getting-started.mdx @@ -30,14 +30,11 @@ container and copying in the files. ```shell {tabTitle:Run in Docker} # Adjust permissions for the configuration directory -# The :z option is only necessary on selinux. -# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label. -docker run --rm -it \ - -v "$(pwd)"/config/:/work/.relay/:z \ - busybox \ - sh -c "chown -R 65532:65532 /work" \ +chown -R 65532:65532 ./config # Generate the configuration +# The :z option is only necessary on selinux. +# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label. docker run --rm -it \ -v "$(pwd)"/config/:/work/.relay/:z \ ghcr.io/getsentry/relay \