Skip to content

Feature: import apps from Docker labels - #556

Merged
SandObserver merged 2 commits into
mainfrom
feat/docker-label-import
Oct 25, 2026
Merged

SandObserver merged 2 commits into
mainfrom
feat/docker-label-import

Conversation

@SandObserver

@SandObserver SandObserver commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add GET /api/docker/labels: reads /containers/json?all=true through the configured socket proxy (16 MB cap, rate limited) and returns only the homepage. name, group, href, icon, description, siteMonitor, ping and weight per container, plus a widget flag. Widget keys never leave the server.
  • Add convertDockerLabels to the foreign importer: builds the gethomepage services shape (folders by name, apps by weight then name, container health check per app) and reuses the YAML import's conversion and preview. Containers without both name and group are listed as not imported.
  • Add an "Import from Docker labels" row under General > Backup. The file import and the label import share one preview dialog. The button stays enabled while busy, so focus returns to it when the dialog closes.
  • Add dockerGet: on a 401 or 403 for an unversioned path, read the engine version from Api-Version on /v1.24/version and retry with that prefix; cached per socket proxy address. Health checks, the socket proxy test and the label import use it.
  • Refuse health pings to link-local addresses (169.254.0.0/16, fe80::/10), by literal or when any resolved address is link-local. Resolve once and connect only to the checked addresses, trying each in turn; a failed lookup is reported, never retried unchecked.
  • Cut app, folder and widget names to 64 grapheme clusters on save, in the server and the admin; cap generated id stems at 32 characters.
  • Strip userinfo from imported links, including protocol-relative ones, and from every import preview line, with a preview note; warn in the app form when a link holds a username and password.
  • Wrap long names in the import preview list.

Testing
All green, including e2e. Added tests for the label route and reader, the version fallback, link-local pings and lookup failures, multi-address pings, the name cap, login stripping, focus after the import, and the new error codes.

Changelog

Added

  • Import apps and folders from gethomepage labels on Docker containers.

Changed

  • Limit app, folder and widget names to 64 characters.
  • Warn in the app form when a link holds a username and password.

Fixed

  • Read the Docker API through socket proxies that allow only versioned paths.
  • Wrap long names in the import preview instead of scrolling sideways.

Security

  • Refuse health check pings to link-local addresses, including the cloud metadata service.
  • Remove usernames and passwords from links during import.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

Read homepage.* labels from every container through the socket proxy and
add them as apps and folders, with the same preview as the YAML import.
Only name, group, link, icon, description, site monitor, ping and weight
leave the server; widget keys never do.

Docker API calls retry with the engine's version prefix when a proxy
refuses unversioned paths. Health pings refuse link-local addresses.
App, folder and widget names are capped at 64 characters, item ids at
32. Imports remove a username and password from addresses, and the app
form warns when a link holds one.
…rom all import text

- Resolve a ping name once, refuse it when any address is link-local, and
  connect only to the checked addresses, trying each in turn. A failed lookup
  is reported, never retried unchecked.
- Remove usernames and passwords from protocol-relative links and from every
  import preview line, stopping at a backslash.
- Keep the Docker label import button enabled while busy so a closing dialog
  returns focus to it.
- Cut app, folder and widget names to 64 grapheme clusters on save instead of
  limiting input by UTF-16 code units.
@SandObserver
SandObserver force-pushed the feat/docker-label-import branch from 6f36125 to 7790b30 Compare October 25, 2026 19:25
@SandObserver
SandObserver merged commit 8978bae into main Oct 25, 2026
6 checks passed
@SandObserver
SandObserver deleted the feat/docker-label-import branch October 25, 2026 19:32
stackyard-release Bot pushed a commit that referenced this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request security Security fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant