netunicorn.base.environment_definitions.DockerImage¶
- class DockerImage(commands=<factory>, runtime_context=<factory>, image=None, build_context=<factory>)[source]¶
Bases:
EnvironmentDefinition
This class represents Environment Definition that is created by using a Docker image.If image name is not provided, then it would be created automatically- Parameters:
image (
Optional
[str
], default:None
) – Docker image namebuild_context (
BuildContext
, default:<factory>
) – build context for this environment definitionruntime_context (
RuntimeContext
, default:<factory>
) – runtime context for this environment definitioncommands (
List
[str
], default:<factory>
)
Attributes
Docker image name
Build context for this environment definition
Runtime context for this environment definition
A list of commands that should be executed to create an environment.
Methods
Creates DockerImage from JSON representation.
-
build_context:
BuildContext
[source]¶ Build context for this environment definition
-
runtime_context:
RuntimeContext
[source]¶ Runtime context for this environment definition
- classmethod from_json(_data)[source]¶
Creates DockerImage from JSON representation.
- Parameters:
_data (
EnvironmentDefinitionRepresentation
) – JSON representation of DockerImage- Returns:
DockerImage
– Deserialized DockerImage