Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ services:
- ./configs:/opt/app-root/src/configs:z
- dynamic-plugins-root:/dynamic-plugins-root
- extensions-catalog:${CATALOG_ENTITIES_EXTRACT_DIR:-/extensions}
# Registry auth for private OCI registries (set REGISTRY_AUTH_FILE_PATH in .env)
- ${REGISTRY_AUTH_FILE_PATH:-./configs/extra-files/templates/placeholder.json}:/opt/app-root/src/.config/containers/auth.json:ro,Z

# RAG initialization service: Copies RAG embeddings and vector database to shared volumes
# This runs once at startup to prepare the RAG data for the lightspeed-core container
Expand Down
2 changes: 1 addition & 1 deletion configs/extra-files/templates/placeholder.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
7 changes: 7 additions & 0 deletions default.env
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ SEGMENT_WRITE_KEY=gGVM6sYRK0D0ndVX22BOtS7NRcxPej8t
# See the compose-with-corporate-proxy.yaml file.
#NO_PROXY=localhost,127.0.0.1

# Path to your local container registry auth file (from podman login / docker login)
# Common locations:
# Podman: ~/.config/containers/auth.json (or $XDG_RUNTIME_DIR/containers/auth.json)
# Docker: ~/.docker/config.json
# See docs/rhdh-local-guide/container-image-guide.md for details.
#REGISTRY_AUTH_FILE_PATH=

# ==============================================================================
# Developer Lightspeed Configuration
# ==============================================================================
Expand Down
35 changes: 33 additions & 2 deletions docs/rhdh-local-guide/container-image-guide.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
## Configuring registry credentials

Place your registry credentials in `./configs/extra-files`, then reference the auth file in your `.env`:
If you need to pull RHDH images or install dynamic plugins from private OCI registries (such as `registry.redhat.io`), you need to configure registry authentication. There are two options:

### Option A: Mount host credentials directly (recommended)

If you already have credentials on your host (from `podman login` or `docker login`), point `REGISTRY_AUTH_FILE_PATH` in your `.env` to that file:

```bash
# Podman (Linux)
REGISTRY_AUTH_FILE_PATH=${XDG_RUNTIME_DIR}/containers/auth.json

# Podman (macOS) or when XDG_RUNTIME_DIR is not set
REGISTRY_AUTH_FILE_PATH=~/.config/containers/auth.json

# Docker
REGISTRY_AUTH_FILE_PATH=~/.docker/config.json
```

The auth file is bind-mounted into the `install-dynamic-plugins` container automatically. When the file contains valid credentials, `REGISTRY_AUTH_FILE` is set internally — no additional configuration needed.

If you haven't logged in yet, do so first:

```bash
podman login registry.redhat.io
```

### Option B: Copy credentials into the project

Copy your registry credentials file into `./configs/extra-files/`, then set the `REGISTRY_AUTH_FILE` variable in your `.env`:

```bash
cp ~/.config/containers/auth.json ./configs/extra-files/auth.json
```

```bash
REGISTRY_AUTH_FILE=/opt/app-root/src/configs/extra-files/auth.json
```

This allows RHDH-local to pull OCI artifacts from registries like registry.redhat.io without authentication errors.
This works because the `configs/` directory is already mounted into the container. Files in `configs/extra-files/` are gitignored, so your credentials will not be committed.

## Changing the container image

Expand Down
9 changes: 9 additions & 0 deletions prepare-and-install-dynamic-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
echo "No .npmrc found, skipping NPM_CONFIG_USERCONFIG"
fi

# If a registry auth file was mounted (not the placeholder), set REGISTRY_AUTH_FILE
REGISTRY_AUTH_PATH="/opt/app-root/src/.config/containers/auth.json"
if [ -z "${REGISTRY_AUTH_FILE:-}" ] && [ -f "$REGISTRY_AUTH_PATH" ] && [ "$(cat "$REGISTRY_AUTH_PATH")" != "{}" ]; then

Check failure on line 56 in prepare-and-install-dynamic-plugins.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-local&issues=AZ_1NZ5nW7mL1CZPKuwi&open=AZ_1NZ5nW7mL1CZPKuwi&pullRequest=151

Check failure on line 56 in prepare-and-install-dynamic-plugins.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-local&issues=AZ_1NZ5nW7mL1CZPKuwh&open=AZ_1NZ5nW7mL1CZPKuwh&pullRequest=151

Check failure on line 56 in prepare-and-install-dynamic-plugins.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-local&issues=AZ_1NZ5nW7mL1CZPKuwj&open=AZ_1NZ5nW7mL1CZPKuwj&pullRequest=151
echo "Found registry auth file, setting REGISTRY_AUTH_FILE"
export REGISTRY_AUTH_FILE="$REGISTRY_AUTH_PATH"
else
echo "No registry auth file mounted, skipping REGISTRY_AUTH_FILE"
fi

DYNAMIC_PLUGINS_EXTENSIONS_FILE="/dynamic-plugins-root/dynamic-plugins.extensions.yaml"
if [ ! -f "$DYNAMIC_PLUGINS_EXTENSIONS_FILE" ]; then
echo "$DYNAMIC_PLUGINS_EXTENSIONS_FILE does not exist - creating it to enable dynamic plugins installation by using Extensions..."
Expand Down