Credentials Safety
The documentation instructs mounting the local registry credentials file into the container; consider recommending a read-only mount and adding a caution that the file contains sensitive credentials and must not be committed/shared. Also verify the chosen in-container path matches what the installer expects.
## Accessing Private Container Registries
If you need to install dynamic plugins from private container 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
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)
~/.docker/config.json (Docker default)
Adjust the source path accordingly based on your container runtime.
</details>
<details><summary><a href='https://github.com/redhat-developer/rhdh-local/pull/151/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R125-R142'><strong>Cross-Platform Notes</strong></a>
The example uses a Linux/Podman-style path; consider briefly noting platform differences (e.g., macOS/Windows, rootless vs root) and that SELinux relabeling is only relevant on SELinux-enabled hosts.
</summary>
```markdown
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
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)
~/.docker/config.json (Docker default)
Adjust the source path accordingly based on your container runtime.
</details>
</td></tr>
<tr><td>📚 <strong>Focus areas based on broader codebase context</strong><br><br>
<details><summary><a href='https://github.com/redhat-developer/rhdh-local/pull/151/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R121-R142'><strong>Docs Alignment</strong></a>
The new guidance recommends mounting a local `auth.json` from the host into `install-dynamic-plugins`, but related docs in the ecosystem describe providing registry credentials via Kubernetes Secrets (and reference official RHDH docs). Consider clarifying that this is a *docker-compose/local* approach and adding a short pointer or alternative steps for cluster deployments to avoid readers applying the host-mount pattern in OpenShift/Kubernetes contexts. (<a href="https://github.com/redhat-developer/rhdh-local/blob/353db4e/docs/catalog-index-configuration.md/#L16-L21">Ref 1</a>, <a href="https://github.com/redhat-developer/rhdh-local/blob/bfe3d48/docs/dynamic-plugins.md/#L5-L41">Ref 8</a>)
</summary>
```markdown
## Accessing Private Container Registries
If you need to install dynamic plugins from private container 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
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)
~/.docker/config.json (Docker default)
Adjust the source path accordingly based on your container runtime.
**Reference reasoning:** Existing documentation for private registry access emphasizes supplying an `auth.json` through a named Secret and mounting it into the relevant container, and also links to the official product documentation for the supported authentication flow. Aligning this README section with that pattern (or explicitly scoping it to local compose usage and linking out) reduces ambiguity and keeps private-registry authentication guidance consistent across installation types.
</details>
</td></tr>
<tr><td>
<details><summary>📄 References</summary><ol><li><a href="https://github.com/redhat-developer/rhdh-local/blob/353db4e/docs/catalog-index-configuration.md/#L16-L21">redhat-developer/rhdh-chart/docs/catalog-index-configuration.md [16-21]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/353db4e/docs/catalog-index-configuration.md/#L1-L15">redhat-developer/rhdh-chart/docs/catalog-index-configuration.md [1-15]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/353db4e/charts/backstage/README.md/#L304-L309">redhat-developer/rhdh-chart/charts/backstage/README.md [304-309]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/bfe3d48/docs/dynamic-plugins.md/#L46-L52">redhat-developer/rhdh-operator/docs/dynamic-plugins.md [46-52]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/bfe3d48/docs/dynamic-plugins.md/#L42-L45">redhat-developer/rhdh-operator/docs/dynamic-plugins.md [42-45]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/bfe3d48/docs/dynamic-plugins.md/#L1-L4">redhat-developer/rhdh-operator/docs/dynamic-plugins.md [1-4]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/516d216/docs/orchestrator-cicd.md/#L103-L123">redhat-developer/rhdh-operator/docs/orchestrator-cicd.md [103-123]</a></li>
<li><a href="https://github.com/redhat-developer/rhdh-local/blob/bfe3d48/docs/dynamic-plugins.md/#L5-L41">redhat-developer/rhdh-operator/docs/dynamic-plugins.md [5-41]</a></li>
</ol></details>
</td></tr>
</table>
PR Type
Documentation
Description
-
Add comprehensive guide for accessing private container registries
-
Document volume mounting configuration for install-dynamic-plugins service
-
Provide common auth.json file locations for Podman and Docker
-
Include notes on credential setup via podman/docker login
File Walkthrough
| Relevant files |
|---|
| Documentation |
README.mdDocument private registry credential mounting setup
README.md
- Added new section "Accessing Private Container Registries" with setup
instructions - Documented volume mount configuration for
~/.config/containers/auth.json - Listed common auth.json file locations for different container
runtimes - Included note about credential creation via podman/docker login
commands
|
+22/-0 |
|
PR Code Suggestions ✨
Explore these optional code suggestions:
| Category | Suggestion | Impact |
| High-level |
Use an override file for compose configuration
Instead of advising users to modify compose.yaml directly, the documentation should recommend using a compose.override.yaml file. This prevents merge conflicts and aligns with standard practices for local configuration.
Examples:
README.md [125-132]
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
</details>
### Solution Walkthrough:
#### Before:
```markdown
# In README.md
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
#### After:
```markdown
# In README.md
Add the following volume to the `install-dynamic-plugins` service by creating a `compose.override.yaml` file:
```yaml
# compose.override.yaml
services:
install-dynamic-plugins:
volumes:
- ~/.config/containers/auth.json:/opt/app-root/src/.config/containers/auth.json:Z
<details><summary>Suggestion importance[1-10]: 8</summary>
__
Why: The suggestion correctly identifies that modifying `compose.yaml` can cause future merge conflicts and proposes using `compose.override.yaml`, which is a best practice that improves maintainability for users.
</details></details></td><td align=center>Medium
</td></tr><tr><td rowspan=1>General</td>
<td>
<details><summary>Clarify instructions for different runtimes</summary>
___
**Clarify the documentation by providing separate, explicit configuration examples <br>for both Podman and Docker users to avoid misconfiguration when accessing <br>private container registries.**
[README.md [125-141]](https://github.com/redhat-developer/rhdh-local/pull/151/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R125-R141)
```diff
-Add the following volume to the `install-dynamic-plugins` service in `compose.yaml`:
+Add the following volume to the `install-dynamic-plugins` service in `compose.yaml`, depending on your container runtime.
+
+**For Podman users:**
+
+Mount your `auth.json` file:
```yaml
install-dynamic-plugins:
volumes:
# ... existing volumes ...
- ~/.config/containers/auth.json:/opt/app-root/src/.config/containers/auth.json:Z
-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.
+For Docker users:
-> NOTE: The location of auth.json may vary depending on your system configuration. Common locations include:
->
-> - ~/.config/containers/auth.json (Podman default)
-> - ~/.docker/config.json (Docker default)
->
-> Adjust the source path accordingly based on your container runtime.
+Mount your config.json file. Note that the destination path inside the container still uses auth.json.
+```yaml
+install-dynamic-plugins:
- volumes:
-
... existing volumes ...
-
- ~/.docker/config.json:/opt/app-root/src/.config/containers/auth.json:Z
+```
+This mounts your local container credentials file into the container, which is typically created when you run podman login or docker login. The tools inside the container will then use these credentials to pull images from private registries.
+
`[To ensure code accuracy, apply this suggestion manually]`
<details><summary>Suggestion importance[1-10]: 6</summary>
__
Why: The suggestion correctly identifies a point of confusion in the documentation and provides a much clearer, less error-prone example for both Podman and Docker users.
</details></details></td><td align=center>Low
</td></tr>
<tr><td align="center" colspan="2">
- [ ] Update <!-- /improve_multi --more_suggestions=true -->
</td><td></td></tr></tbody></table>
|