DockerBuildContext Class

Defines a Docker build context.

Class DockerBuildContext constructor.

Inheritance
azureml._base_sdk_common.abstract_run_config_element._AbstractRunConfigElement
DockerBuildContext

Constructor

DockerBuildContext(location_type=None, location=None, dockerfile_path='Dockerfile')

Parameters

location_type
default value: None
location
default value: None
dockerfile_path
default value: Dockerfile

Variables

azureml.core.environment.DockerBuildContext.location_type

Type of Docker build context location

azureml.core.environment.DockerBuildContext.location

Docker build context location.

dockerfile_path
str

Path of the Dockerfile relative to the root of the build context, defaults to Dockerfile.

Methods

from_local_directory

Create DockerBuildContext object from a local directory containing a Docker build context.

from_local_directory

Create DockerBuildContext object from a local directory containing a Docker build context.

static from_local_directory(workspace, path, dockerfile_path='Dockerfile')

Parameters

workspace
Workspace
Required

The workspace in which the environment will be created.

path
str
Required

Path to the directory containing the Docker build context.

dockerfile_path
str
default value: Dockerfile

Dockerfile path relative to the root of the Docker build context, defaults to Dockerfile.

Returns

The DockerBuildContext object.

Return type