docs: remove duplicate ddClient declaration in backend extension tutorial#25324
docs: remove duplicate ddClient declaration in backend extension tutorial#25324mohithshuka wants to merge 8 commits into
Conversation
The previous description said 'optimize your repository storage' which was vague and did not reflect the page's actual content. The manage.md page is focused on viewing, filtering, and deleting images and image indexes. Updated the description to accurately reflect this. Fixes docker#25005
The daemon configuration overview only mentioned two methods (JSON file and flags) but was missing the environment variables method via systemd. Added a new section explaining how to use systemd drop-in overrides to set daemon environment variables. Fixes docker#25062
Replace shorthand alias 'docker scout env' with the full canonical command name 'docker scout environment' in the environment integration overview page, matching the CLI reference and cli.md usage. Closes docker#25085
The _index.md page mixed 'docker scout env' and 'docker scout environment' interchangeably. The CLI reference uses 'environment' as the canonical name, so prose references are updated to match. Fixes docker#25085
…ct example Fixes docker#25192 useState was used on line 286 but was missing from the import statement, causing an error if users follow the tutorial literally.
The React code example was using useState, useEffect, and createDockerDesktopClient without importing them, which would cause errors for anyone copy-pasting the snippet. Fixes docker#25192
…rial The createDockerDesktopClient() was declared twice - once at module level (correct) and again inside the App() function (redundant/incorrect). Removed the duplicate declaration inside the function. Fixes docker#25192
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates multiple documentation pages to reflect updated CLI usage and improve Extension SDK React examples, plus adds daemon configuration guidance.
Changes:
- Replace
docker scout envreferences withdocker scout environmentin the Scout “Environments” docs. - Adjust React example snippets to create the Docker Desktop client outside the component.
- Add a new section describing Docker daemon configuration via environment variables.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| content/manuals/scout/integrations/environment/_index.md | Updates documented Docker Scout CLI commands for environments. |
| content/manuals/extensions/extensions-sdk/guides/invoke-host-binaries.md | Adjusts SDK guide React snippet and (unexpectedly) adds leading blank lines. |
| content/manuals/extensions/extensions-sdk/build/backend-extension-tutorial.md | Updates tutorial React imports and moves Docker Desktop client creation outside the component. |
| content/manuals/engine/daemon/_index.md | Adds an environment-variable configuration section and updates the list of configuration methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -52,15 +52,15 @@ To see all of the available environments for an organization, you can use the | |||
| `docker scout env` command. | |||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| --- | ||
| title: Invoke host binaries | ||
| description: Add invocations to host binaries from the frontend with the extension |
| ## Configure the Docker daemon | ||
|
|
||
| There are two ways to configure the Docker daemon: | ||
| There are three ways to configure the Docker daemon: |
| - Use flags when starting `dockerd`. | ||
| - Use environment variables to set daemon options. | ||
|
|
||
| You can use both of these options together as long as you don't specify the same |
|
|
||
| To set environment variables for the Docker daemon using systemd, create a | ||
| drop-in override file: | ||
|
|
| ### Configuration using environment variables | ||
|
|
||
| You can configure the Docker daemon using environment variables. This is useful | ||
| in systemd service overrides or init scripts. |
| ``````` | ||
|
|
||
| Add the following: | ||
|
|
|
@mohithshuka, closing this PR. As mentioned on previous PRs, this branch was not created from Please do not open another PR until you have resolved your workflow. Every PR you submit should contain only the changes relevant to that PR, branched directly from |
Problem
In the React code example for the backend extension tutorial,
createDockerDesktopClient()was declared twice:App()function (redundant, shadows the outer variable)Fix
Removed the duplicate
const ddClient = createDockerDesktopClient()from inside the
App()function, keeping only the module-level declaration.Testing
No build changes — documentation fix only.
Fixes #25192