Package org.ivoa.dm.executionbroker
Class DockerContainer
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.AbstractExecutable
org.ivoa.dm.executionbroker.DockerContainer
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:DockerContainer",
role=objectType)
public class DockerContainer
extends AbstractExecutable
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Details for a Docker or OCI container executable. See https://opencontainers.org/.
objectType: DockerContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for DockerContainer, mainly for use in the functional builder pattern.Nested classes/interfaces inherited from class org.ivoa.dm.executionbroker.AbstractExecutable
AbstractExecutable.AbstractExecutableBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringOverwrite the default ENTRYPOINT of the image.protected NameValueMapA name => value map of environment variables to pass to the container.protected DockerImageSpecDetails of the container image.protected DockerNetworkSpecDetails of the network access available to the container.protected BooleanSet the privileged flag on execution.Fields inherited from class org.ivoa.dm.executionbroker.AbstractExecutable
lifecycleFields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DockerContainerDockerContainer(AbstractExecutable superinstance, DockerImageSpec image, Boolean privileged, String entrypoint, NameValueMap environment, DockerNetworkSpec network) Constructor from supertype instance.DockerContainer(DockerContainer other) Copy Constructor.DockerContainer(DockerImageSpec image, Boolean privileged, String entrypoint, NameValueMap environment, DockerNetworkSpec network, LifecycleComponent lifecycle, String kind, ComponentMetadata meta) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static DockerContainercreate a DockerContainer in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns entrypoint Attribute.Returns environment Attribute.getImage()Returns image Attribute.Returns network Attribute.Returns privileged Attribute.voidsetEntrypoint(String pEntrypoint) Set entrypoint Attribute.voidsetEnvironment(NameValueMap pEnvironment) Set environment Attribute.voidsetImage(DockerImageSpec pImage) Set image Attribute.voidsetNetwork(DockerNetworkSpec pNetwork) Set network Attribute.voidsetPrivileged(Boolean pPrivileged) Set privileged Attribute.voidupdateUsing(DockerContainer other) Update this object with the content of the given object.withEntrypoint(String pEntrypoint) fluent setter for entrypoint Attribute.withEnvironment(NameValueMap pEnvironment) fluent setter for environment Attribute.withImage(DockerImageSpec pImage) fluent setter for image Attribute.withNetwork(DockerNetworkSpec pNetwork) fluent setter for network Attribute.withPrivileged(Boolean pPrivileged) fluent setter for privileged Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractExecutable
createAbstractExecutable, getLifecycle, setLifecycle, updateUsing, withLifecycleMethods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
image
@VoDml(id="execbroker:DockerContainer.image", role=composition, type="execbroker:DockerImageSpec", typeRole=objectType) protected DockerImageSpec imageDetails of the container image. composition image : ( Multiplicity : 1 ) -
privileged
@VoDml(id="execbroker:DockerContainer.privileged", role=attribute, type="ivoa:boolean", typeRole=primitiveType) protected Boolean privilegedSet the privileged flag on execution. The default is `false`. See https://docs.docker.com/reference/cli/docker/container/run/#privileged. : Attribute privileged : multiplicity 1 -
entrypoint
@VoDml(id="execbroker:DockerContainer.entrypoint", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String entrypointOverwrite the default ENTRYPOINT of the image. : Attribute entrypoint : multiplicity 1 -
environment
@VoDml(id="execbroker:DockerContainer.environment", role=attribute, type="execbroker:NameValueMap", typeRole=dataType) protected NameValueMap environmentA name => value map of environment variables to pass to the container. : Attribute environment : multiplicity 1 -
network
@VoDml(id="execbroker:DockerContainer.network", role=composition, type="execbroker:DockerNetworkSpec", typeRole=objectType) protected DockerNetworkSpec networkDetails of the network access available to the container. composition network : ( Multiplicity : 1 )
-
-
Constructor Details
-
DockerContainer
public DockerContainer()Creates a new DockerContainer -
DockerContainer
public DockerContainer(DockerImageSpec image, Boolean privileged, String entrypoint, NameValueMap environment, DockerNetworkSpec network, LifecycleComponent lifecycle, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
image- Details of the container image.privileged- Set the privileged flag on execution. The default is `false`. See https://docs.docker.com/reference/cli/docker/container/run/#privileged.entrypoint- Overwrite the default ENTRYPOINT of the image.environment- A name => value map of environment variables to pass to the container.network- Details of the network access available to the container.lifecycle- .kind- The component type identifier.meta- The component metadata.
-
DockerContainer
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
DockerContainer
public DockerContainer(AbstractExecutable superinstance, DockerImageSpec image, Boolean privileged, String entrypoint, NameValueMap environment, DockerNetworkSpec network) Constructor from supertype instance.- Parameters:
superinstance- The supertype.image- Details of the container image.privileged- Set the privileged flag on execution. The default is `false`. See https://docs.docker.com/reference/cli/docker/container/run/#privileged.entrypoint- Overwrite the default ENTRYPOINT of the image.environment- A name => value map of environment variables to pass to the container.network- Details of the network access available to the container.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Overrides:
copyMein classAbstractExecutable- Returns:
- the cloned object.
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getImage
Returns image Attribute.- Returns:
- image Attribute
-
setImage
Set image Attribute.- Parameters:
pImage- value to set
-
withImage
fluent setter for image Attribute.- Parameters:
pImage- value to set- Returns:
- DockerContainer
-
getPrivileged
Returns privileged Attribute.- Returns:
- privileged Attribute
-
setPrivileged
Set privileged Attribute.- Parameters:
pPrivileged- value to set
-
withPrivileged
fluent setter for privileged Attribute.- Parameters:
pPrivileged- value to set- Returns:
- DockerContainer
-
getEntrypoint
Returns entrypoint Attribute.- Returns:
- entrypoint Attribute
-
setEntrypoint
Set entrypoint Attribute.- Parameters:
pEntrypoint- value to set
-
withEntrypoint
fluent setter for entrypoint Attribute.- Parameters:
pEntrypoint- value to set- Returns:
- DockerContainer
-
getEnvironment
Returns environment Attribute.- Returns:
- environment Attribute
-
setEnvironment
Set environment Attribute.- Parameters:
pEnvironment- value to set
-
withEnvironment
fluent setter for environment Attribute.- Parameters:
pEnvironment- value to set- Returns:
- DockerContainer
-
getNetwork
Returns network Attribute.- Returns:
- network Attribute
-
setNetwork
Set network Attribute.- Parameters:
pNetwork- value to set
-
withNetwork
fluent setter for network Attribute.- Parameters:
pNetwork- value to set- Returns:
- DockerContainer
-
createDockerContainer
public static DockerContainer createDockerContainer(Consumer<DockerContainer.DockerContainerBuilder> f) create a DockerContainer in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractExecutable
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Overrides:
deletein classAbstractExecutable
-