Class DockerfileDeployer
- java.lang.Object
-
- com.oracle.bedrock.runtime.remote.options.FileShareDeployer
-
- com.oracle.bedrock.runtime.docker.options.DockerfileDeployer
-
- All Implemented Interfaces:
com.oracle.bedrock.Option,Deployer
public class DockerfileDeployer extends FileShareDeployer
A specializedDeployerthat 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDockerfileDeployer.AddFileA simple holder class for files to add to a Dockerfile.
-
Constructor Summary
Constructors Constructor Description DockerfileDeployer(String workingDirectory, com.oracle.bedrock.Option... options)Construct a newDockerfileDeployer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanperformRemoteCopy(String source, String destination, com.oracle.bedrock.runtime.Platform platform, com.oracle.bedrock.OptionsByType optionsByType)Write an ADD statement for the specified artifact.voidwrite(PrintWriter writer)Write the Dockerfile ADD commands.-
Methods inherited from class com.oracle.bedrock.runtime.remote.options.FileShareDeployer
deploy, getLocalShareName, getRemoteShareName, undeploy
-
-
-
-
Constructor Detail
-
DockerfileDeployer
public DockerfileDeployer(String workingDirectory, com.oracle.bedrock.Option... options)
Construct a newDockerfileDeployer.- Parameters:
workingDirectory- the folder to copy the artifacts tooptions- theOptions 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:
performRemoteCopyin classFileShareDeployer- Parameters:
source- the file to adddestination- the remote location to copy the artifact to in the Dockerfileplatform- thePlatformto performoptionsByType- theOptionsByTypeto control the deployment- Returns:
- this method always returns true
-
write
public void write(PrintWriter writer)
Write the Dockerfile ADD commands.- Parameters:
writer- thePrintWriterto write the ADD commands to
-
-