Skip to content

feat: implement Custom Docker Labels parsing and backend population (Fixes #1518)#213

Open
brianewman wants to merge 1 commit intoIceWhaleTech:mainfrom
brianewman:feat-docker-labels
Open

feat: implement Custom Docker Labels parsing and backend population (Fixes #1518)#213
brianewman wants to merge 1 commit intoIceWhaleTech:mainfrom
brianewman:feat-docker-labels

Conversation

@brianewman
Copy link
Copy Markdown

@brianewman brianewman commented Feb 28, 2026

What does this PR do?

Adds backend API support and container deployment logic for parsing arbitrary custom Docker Labels, allowing users to apply specific labels to their CasaOS applications.

This backend submission is the server-side companion to the label configuration wizard implemented in CasaOS-UI PR 259.

Changes Made

  • Modified CustomizationPostData in model/manifest.go to accept a new CustomLabels EnvArray field.
  • Updated the OpenAPI v1 schema to document the new custom_labels property.
  • Added a ToMap() mapper utility for EnvArray inside model/manifest_adapter.go to seamlessly morph the Key-Value array into the map[string]string format expected by Docker.
  • Patched dockerService.CreateContainer() in service/container.go to iterate over incoming custom labels and inject them directly into the deployment config, bringing parity to both legacy Docker installs and v2 Compose architectures.

Related Issues

  • Resolves #1518

@brianewman
Copy link
Copy Markdown
Author

Closing this temporarily. I realized I targeted main instead of the correct development branch. I will open an issue to discuss the feature and find out the correct target branch before resubmitting. Thanks!

@brianewman brianewman closed this Feb 28, 2026
@brianewman
Copy link
Copy Markdown
Author

Upon further review, it appears it may be acceptable to submit this against main. I'm going to reopen it, but feel free to close it if I'm wrong.

@brianewman brianewman reopened this Mar 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 3, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant