java.lang.Object
com.winchesters.devopsify.service.technologies.docker.dockerfile.DockerFile
All Implemented Interfaces:
GeneratedFile
Direct Known Subclasses:
BackendDockerFile, DataBaseDockerFile, FrontEndDockerFile

public abstract class DockerFile extends Object implements GeneratedFile
  • Constructor Details

    • DockerFile

      public DockerFile()
  • Method Details

    • writeFile

      public final void writeFile(String path) throws IOException
      generates the dockerfile
      Specified by:
      writeFile in interface GeneratedFile
      Parameters:
      path - full path -- filename included
      Throws:
      IOException
    • getDockerfileContent

      public abstract String getDockerfileContent() throws IOException
      generates the content of a dockerfile from a template
      Returns:
      a string containing the dockerfile content
      Throws:
      IOException - when io exception occurs
    • getFileContent

      public String getFileContent() throws IOException
      Description copied from interface: GeneratedFile
      generates the content of a dockerfile from a template
      Specified by:
      getFileContent in interface GeneratedFile
      Returns:
      a string containing the dockerfile content
      Throws:
      IOException - when io exception occurs
    • getDockerfileTemplate

      protected abstract File getDockerfileTemplate()
      reads the template dockerfile
      Returns:
      the dockerfile template
    • getFileTemplate

      public File getFileTemplate()
      Description copied from interface: GeneratedFile
      reads the template dockerfile
      Specified by:
      getFileTemplate in interface GeneratedFile
      Returns:
      the dockerfile template
    • getDockerfileTemplate

      protected final File getDockerfileTemplate(DockerFileType dockerFileType)
      Parameters:
      dockerFileType - the type of the template -- db - maven - react .. reads the template dockerfile
      Returns:
      the dockerfile template