Skip to content

docs: remove duplicate ddClient declaration in backend extension tutorial#25324

Closed
mohithshuka wants to merge 8 commits into
docker:mainfrom
mohithshuka:fix/missing-usestate-import-25192
Closed

docs: remove duplicate ddClient declaration in backend extension tutorial#25324
mohithshuka wants to merge 8 commits into
docker:mainfrom
mohithshuka:fix/missing-usestate-import-25192

Conversation

@mohithshuka

Copy link
Copy Markdown
Contributor

Problem

In the React code example for the backend extension tutorial,
createDockerDesktopClient() was declared twice:

  • Once at module level (correct pattern per Docker docs)
  • Again inside the 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

mohithshuka added 8 commits May 15, 2026 16:36
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
Copilot AI review requested due to automatic review settings June 10, 2026 13:40
@mohithshuka mohithshuka requested a review from aevesdocker as a code owner June 10, 2026 13:40
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit a611ed0
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a29695b1f28a50008278216
😎 Deploy Preview https://deploy-preview-25324--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added area/engine Issue affects Docker engine/daemon area/extensions Relates to Docker Extensions area/scout Relates to Docker Scout labels Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 env references with docker scout environment in 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.
Comment on lines +1 to 9






---
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:

Comment on lines +96 to +99
### 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:

@craig-osterhout

Copy link
Copy Markdown
Contributor

@mohithshuka, closing this PR. As mentioned on previous PRs, this branch was not created from main and contains commits unrelated to this issue.

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 main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine Issue affects Docker engine/daemon area/extensions Relates to Docker Extensions area/scout Relates to Docker Scout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs-scanner] Missing useState import in backend extension React example

3 participants