`; resultsHTML += results .map((item) => { return `
${item.meta.title}

…${item.excerpt}…

`; }) .join(""); if (resultsLength > 5) { resultsHTML += ``; } searchBarResults.innerHTML = resultsHTML; } } searchBarInput.addEventListener("input", search); if (window.heap !== undefined) { searchBarResults.addEventListener('click', function (event) { if (event.target.tagName === 'A' && event.target.closest('.link')) { const searchQuery = event.target.getAttribute('data-query'); const resultIndex = event.target.getAttribute('data-index'); const url = new URL(event.target.href); const properties = { docs_search_target_path: url.pathname, docs_search_target_title: event.target.textContent, docs_search_query_text: searchQuery, docs_search_target_index: resultIndex, docs_search_source_path: window.location.pathname, docs_search_source_title: document.title, }; heap.track("Docs - Search - Click - Result Link", properties); } }); } });

docker node update

DescriptionUpdate a node
Usagedocker node update [OPTIONS] NODE

Swarm This command works with the Swarm orchestrator.

Description

Update metadata about a node, such as its availability, labels, or roles.

Note

This is a cluster management command, and must be executed on a swarm manager node. To learn about managers and workers, refer to the Swarm mode section in the documentation.

Options

OptionDefaultDescription
--availabilityAvailability of the node (active, pause, drain)
--label-addAdd or update a node label (key=value)
--label-rmRemove a node label if exists
--roleRole of the node (worker, manager)

Examples

Add label metadata to a node (--label-add)

Add metadata to a swarm node using node labels. You can specify a node label as a key with an empty value:

$ docker node update --label-add foo worker1

To add multiple labels to a node, pass the --label-add flag for each label:

$ docker node update --label-add foo --label-add bar worker1

When you create a service, you can use node labels as a constraint. A constraint limits the nodes where the scheduler deploys tasks for a service.

For example, to add a type label to identify nodes where the scheduler should deploy message queue service tasks:

$ docker node update --label-add type=queue worker1

The labels you set for nodes using docker node update apply only to the node entity within the swarm. Do not confuse them with the docker daemon labels for dockerd.

For more information about labels, refer to apply custom metadata.