Cloud API Overview > @adpt/cloud > docker > ServiceContainerSet
docker.ServiceContainerSet class
A component for mapping a group of abstract Containers and NetworkServices to Docker DockerContainers and docker.NetworkService()s.
Signature:
export declare class ServiceContainerSet extends DeferredComponent<ServiceContainerSetProps>
Remarks
This component is intended to be used to replace Container and NetworkService components that are grouped together, as the only children of a common parent in a pattern that looks like this:
<Service>
<Container ... />
<Container ... />
<NetworkService ... />
</Service>
ServiceContainerSet
maps those abstract components into Docker components like this:
<Group>
<docker.DockerContainer ... >
<docker.DockerContainer ... >
<docker.NetworkService ... >
</Group>
An example style rule to do this is:
{Service}
{Adapt.rule((matchedProps) => {
const { handle, ...remainingProps } = matchedProps;
return <ServiceContainerSet {...remainingProps} />;
})}
Currently, docker.NetworkService() implements the NetworkServiceInstance interface, but does not deploy a network proxy component. So the Docker ServiceContainerSet component applies the network port configuration specified by the NetworkServices to their target DockerContainers.
Methods
Method | Modifiers | Description |
---|---|---|
build(helpers) |