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

Name Description
location_type
Default value: None
location
Default value: None
dockerfile_path
Default value: Dockerfile

Variables

Name Description
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

Name Description
workspace
Required

The workspace in which the environment will be created.

path
Required
str

Path to the directory containing the Docker build context.

dockerfile_path
str

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

Default value: Dockerfile

Returns

Type Description

The DockerBuildContext object.