DockerBuildContext Klasse

Definiert einen Docker-Buildkontext.

DockerBuildContext-Konstruktor der Klasse.

Vererbung
azureml._base_sdk_common.abstract_run_config_element._AbstractRunConfigElement
DockerBuildContext

Konstruktor

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

Parameter

location_type
Standardwert: None
location
Standardwert: None
dockerfile_path
Standardwert: Dockerfile

Variablen

azureml.core.environment.DockerBuildContext.location_type

Typ des Docker-Buildkontextspeicherorts

azureml.core.environment.DockerBuildContext.location

Speicherort des Docker-Buildkontexts.

dockerfile_path
str

Der Pfad der Dockerfile relativ zum Stamm des Buildkontexts lautet standardmäßig Dockerfile.

Methoden

from_local_directory

Erstellen Sie das DockerBuildContext-Objekt aus einem lokalen Verzeichnis, das einen Docker-Buildkontext enthält.

from_local_directory

Erstellen Sie das DockerBuildContext-Objekt aus einem lokalen Verzeichnis, das einen Docker-Buildkontext enthält.

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

Parameter

workspace
Workspace
Erforderlich

Der Arbeitsbereich, in dem die Umgebung erstellt wird.

path
str
Erforderlich

Pfad zu dem Verzeichnis, das den Docker-Buildkontext enthält.

dockerfile_path
str
Standardwert: Dockerfile

Dockerfile-Pfad relativ zum Stamm des Docker-Buildkontexts ist standardmäßig Dockerfile.

Gibt zurück

Das DockerBuildContext-Objekt.

Rückgabetyp