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 on SelfAware.
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 Details

  • Method Details

    • withPath

      public T withPath(String path)
      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

      public T withContext(String context)
      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

      public T withBuildArg(String key, String value)
    • self

      public T self()
      Description copied from interface: SelfAware
      Returns a reference to the object that implements this interface.
      Specified by:
      self in interface ResourceWithEndpoints<T extends DockerFile<T>>
      Specified by:
      self in interface SelfAware<T extends DockerFile<T>>
      Returns:
      A reference to the object that implements this interface.