Dela via


DockerBuildContext Klass

Definierar en Docker-byggkontext.

DockerBuildContext-konstruktor för klass.

Arv
azureml._base_sdk_common.abstract_run_config_element._AbstractRunConfigElement
DockerBuildContext

Konstruktor

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

Parametrar

Name Description
location_type
Standardvärde: None
location
Standardvärde: None
dockerfile_path
Standardvärde: Dockerfile

Variabler

Name Description
azureml.core.environment.DockerBuildContext.location_type

Typ av Docker-byggkontextplats

azureml.core.environment.DockerBuildContext.location

Docker-byggkontextplats.

dockerfile_path
str

Sökvägen till Dockerfile i förhållande till roten för byggkontexten, som standard dockerfile.

Metoder

from_local_directory

Skapa DockerBuildContext-objekt från en lokal katalog som innehåller en Docker-byggkontext.

from_local_directory

Skapa DockerBuildContext-objekt från en lokal katalog som innehåller en Docker-byggkontext.

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

Parametrar

Name Description
workspace
Obligatorisk

Arbetsytan där miljön ska skapas.

path
Obligatorisk
str

Sökväg till katalogen som innehåller Docker-kompileringskontexten.

dockerfile_path
str

Dockerfile-sökvägen i förhållande till roten för Docker-byggkontexten, är som standard Dockerfile.

Standardvärde: Dockerfile

Returer

Typ Description

DockerBuildContext-objektet.