Skip to content
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ podman compose restart rhdh # or: docker compose restart rhdh
podman compose down --volumes # or: docker compose down --volumes
```

## Accessing Plugins from Private OCI Registries

If you need to install dynamic plugins from private OCI registries, you can mount your local container credentials into the `install-dynamic-plugins` service. This allows the plugin installer to authenticate with private registries using the credentials you already have configured on your system.

Add the following volume to the `install-dynamic-plugins` service in `compose.yaml`:

```yaml
install-dynamic-plugins:
volumes:
# ... existing volumes ...
- ~/.config/containers/auth.json:/opt/app-root/src/.config/containers/auth.json:Z
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this requires modifying a version-controlled file, which I believe we are striving to avoid as much as possible for users.

Not tested, but I wonder if we could not actually add this by default as a configurable bind mount in the current compose.yaml:

install-dynamic-plugins:
  volumes:
    # ... existing volumes ...
    - ${REGISTRY_AUTH_FILE_PATH:-./configs/registry-auth.example.json}:/opt/app-root/src/.config/containers/auth.example.json:Z

Adding a default value to mount an example empty auth file, so that this is optional.
But assuming skopeo will fail if the auth.json file is not valid json, I guess we can maybe do some special handling in the prepare-and-install-dynamic-plugins.sh script to copy /opt/app-root/src/.config/containers/auth.example.json to /opt/app-root/src/.config/containers/auth.json if REGISTRY_AUTH_FILE_PATH is set in the env.

With this, users would only need to set the REGISTRY_AUTH_FILE_PATH in their local .env file.
WDYT?


This mounts your local `auth.json` file (which contains credentials for container registries like `registry.redhat.io`, `quay.io`, etc.) into the container. The credentials are typically created when you run `podman login` or `docker login`.

> **NOTE**: The location of `auth.json` may vary depending on your system configuration. Common locations include:
>
> - `~/.config/containers/auth.json` (Podman default)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the default value for Podman is ${XDG_RUNTIME_DIR:-~/.config}/containers/auth.json (at least on Linux): https://docs.podman.io/en/latest/markdown/podman-login.1.html#description

> - `~/.docker/config.json` (Docker default)
>
> Adjust the source path accordingly based on your container runtime.

## Additional Configuration Guides

If you would like to change your RHDH-Local setup, or add additional features or plugins, please check out the guides below.
Expand Down