Module com.azure.runtime.host
Package com.azure.runtime.host.resources
Class DockerFile<T extends DockerFile<T>>
java.lang.Object
com.azure.runtime.host.resources.Resource<T>
com.azure.runtime.host.resources.DockerFile<T>
- Type Parameters:
T
- The specific type of the resource, which may or may not be a subtype of this class. This allows for method chaining, even when using a subtype, when used in conjunction with the API onSelfAware
.
- All Implemented Interfaces:
ResourceTrait<T>
,ResourceWithEndpoints<T>
,ResourceWithEnvironment<T>
,ResourceWithLifecycle
,ResourceWithReference<T>
,SelfAware<T>
- Direct Known Subclasses:
EurekaServiceDiscovery
public class DockerFile<T extends DockerFile<T>>
extends Resource<T>
implements ResourceWithEnvironment<T>, ResourceWithEndpoints<T>, ResourceWithReference<T>
A resource that represents a Dockerfile that will be built into a container during deployment.
-
Constructor Summary
ModifierConstructorDescriptionprotected
DockerFile
(ResourceType type, String name) DockerFile
(String name) DockerFile
(String name, String path) DockerFile
(String name, String path, String context) -
Method Summary
Modifier and TypeMethodDescriptionself()
Returns a reference to the object that implements this interface.withBuildArg
(String key, String value) withContext
(String context) Sets the path to the context that will be used to build a container image.Sets the path to the Dockerfile to be built into a container image.Methods inherited from class com.azure.runtime.host.resources.Resource
copyInto, getAnnotations, getName, getType, withAnnotation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithEndpoints
getEndpoint, getEndpoints, withExternalHttpEndpoints, withHttpEndpoint, withHttpEndpoint, withHttpsEndpoint, withHttpsEndpoint
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithEnvironment
withEnvironment, withEnvironment, withEnvironment, withReference, withReference, withReference
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithLifecycle
onResourceAdded, onResourcePrecommit, onResourceRemoved
Methods inherited from interface com.azure.runtime.host.resources.traits.ResourceWithReference
withReference
-
Constructor Details
-
DockerFile
-
DockerFile
-
DockerFile
-
DockerFile
-
-
Method Details
-
withPath
Sets the path to the Dockerfile to be built into a container image. The path must be relative to the root directory, i.e. from where azd is being executed from.- Parameters:
path
- A path to the Dockerfile, relative to the directory where azd will be executed from.- Returns:
- The DockerFile object.
-
withContext
Sets the path to the context that will be used to build a container image. The path must be relative to the root directory, i.e. from where azd is being executed from.- Parameters:
context
- A path to the context, relative to the directory where azd will be executed from.- Returns:
- The DockerFile object.
-
withBuildArg
-
self
Description copied from interface:SelfAware
Returns a reference to the object that implements this interface.- Specified by:
self
in interfaceResourceWithEndpoints<T extends DockerFile<T>>
- Specified by:
self
in interfaceSelfAware<T extends DockerFile<T>>
- Returns:
- A reference to the object that implements this interface.
-