Class DockerfileDeployer

  • All Implemented Interfaces:
    com.oracle.bedrock.Option, Deployer

    public class DockerfileDeployer
    extends FileShareDeployer
    A specialized Deployer that copied the artifacts to be deployed to the folder containing a Dockerfile and for each artifact adds it to a list of files ro become ADD commands in the Dockerfile.

    Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

    Author:
    Jonathan Knight
    • Constructor Detail

      • DockerfileDeployer

        public DockerfileDeployer​(String workingDirectory,
                                  com.oracle.bedrock.Option... options)
        Construct a new DockerfileDeployer.
        Parameters:
        workingDirectory - the folder to copy the artifacts to
        options - the Options controlling the Dockerfile
    • Method Detail

      • performRemoteCopy

        protected boolean performRemoteCopy​(String source,
                                            String destination,
                                            com.oracle.bedrock.runtime.Platform platform,
                                            com.oracle.bedrock.OptionsByType optionsByType)
        Write an ADD statement for the specified artifact.
        Specified by:
        performRemoteCopy in class FileShareDeployer
        Parameters:
        source - the file to add
        destination - the remote location to copy the artifact to in the Dockerfile
        platform - the Platform to perform
        optionsByType - the OptionsByType to control the deployment
        Returns:
        this method always returns true
      • write

        public void write​(PrintWriter writer)
        Write the Dockerfile ADD commands.
        Parameters:
        writer - the PrintWriter to write the ADD commands to