Skip to content

Commit cc718df

Browse files
authored
fix(relay): Fix Relay docker commands, registry, nonroot (#14955)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR - The permission change no longer works, due to Relay having a different base docker container. I opted to use busybox to make the permission change (with the new user/group id) to make it fully copy pastable, the alternative would be a `sudo chown` from the host. - Fixed the `$(pwd)` quoting, this would fail on paths with spaces. - Switched the registry to ghcr.io as the dockerhub image is seemingly deprecated <img width="1165" height="131" alt="image" src="https://github.com/user-attachments/assets/0e1ff9bc-0d71-4a42-946b-b45e13b44769" /> Fixes: INGEST-579 ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [x] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
1 parent 5620ed2 commit cc718df

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

docs/product/relay/getting-started.mdx

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Getting started with [Relay](/product/relay/) is as simple as using the default
99
<Alert>
1010

1111
The Relay server is called `relay`. Download binaries from [GitHub
12-
Releases](https://github.com/getsentry/relay/releases). A Docker image is provided on [DockerHub](https://hub.docker.com/r/getsentry/relay/).
12+
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).
1313

1414
</Alert>
1515

@@ -30,18 +30,14 @@ container and copying in the files.
3030

3131
```shell {tabTitle:Run in Docker}
3232
# Adjust permissions for the configuration directory
33-
# The :z option is only necessary on selinux.
34-
# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label.
35-
docker run --rm -it \
36-
-v $(pwd)/config/:/work/.relay/:z \
37-
--entrypoint bash \
38-
getsentry/relay \
39-
-c 'chown -R relay:relay /work/.relay'
33+
chown -R 65532:65532 ./config
4034

4135
# Generate the configuration
42-
docker run --rm -it \
43-
-v $(pwd)/config/:/work/.relay/:z \
44-
getsentry/relay \
36+
# The :z option is only necessary on selinux.
37+
# See https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label.
38+
docker run --rm -it \
39+
-v "$(pwd)"/config/:/work/.relay/:z \
40+
ghcr.io/getsentry/relay \
4541
config init
4642
```
4743

@@ -128,9 +124,9 @@ To register Relay with Sentry:
128124
1. Copy the contents of the public key, either by inspecting the `credentials.json` file or by running:
129125

130126
```shell {tabTitle:Run in Docker}
131-
docker run --rm -it \
132-
-v $(pwd)/config/:/work/.relay/ \
133-
getsentry/relay \
127+
docker run --rm -it \
128+
-v "$(pwd)"/config/:/work/.relay/ \
129+
ghcr.io/getsentry/relay \
134130
credentials show
135131
```
136132

@@ -154,10 +150,10 @@ This process registers Relay with Sentry so it is ready to send messages. See
154150
After registering Relay with Sentry, it is ready to run:
155151

156152
```shell {tabTitle:Run in Docker}
157-
docker run --rm -it \
158-
-v $(pwd)/config/:/work/.relay/ \
159-
-p 3000:3000 \
160-
getsentry/relay \
153+
docker run --rm -it \
154+
-v "$(pwd)"/config/:/work/.relay/ \
155+
-p 3000:3000 \
156+
ghcr.io/getsentry/relay \
161157
run
162158
```
163159

@@ -181,10 +177,10 @@ Refer to the [Logging](../monitoring/#logging) page for more information on how
181177
If you moved your config folder (for example, for security reasons), use the `--config` option to specify the location:
182178

183179
```shell {tabTitle:Run in Docker}
184-
docker run --rm -it \
185-
-v $(pwd)/config/:/etc/relay/ \
186-
-p 3000:3000 \
187-
getsentry/relay \
180+
docker run --rm -it \
181+
-v "$(pwd)"/config/:/etc/relay/ \
182+
-p 3000:3000 \
183+
ghcr.io/getsentry/relay \
188184
run --config /etc/relay/
189185
```
190186

0 commit comments

Comments
 (0)