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

location_type
standardvärde: None
location
standardvärde: None
dockerfile_path
standardvärde: Dockerfile

Variabler

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

workspace
Workspace
Obligatorisk

Arbetsytan där miljön ska skapas.

path
str
Obligatorisk

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

dockerfile_path
str
standardvärde: Dockerfile

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

Returer

DockerBuildContext-objektet.

Returtyp