/**
     * Write a Dockerfile for the current federate as given by filename.
     * The file will go into src-gen/filename.Dockerfile.
     * If there is no main reactor, then no Dockerfile will be generated
     * (it wouldn't be very useful).
     * @param The directory where the docker compose file is generated.
     * @param The name of the docker file.
     * @param The name of the federate.
     */
@Override 
    public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) {
        if (mainDef == null) {
            return;
        }
        Path srcGenPath = fileConfig.getSrcGenPath();
        String dockerFile = srcGenPath + File.separator + dockerFileName;
        CodeBuilder contents = new CodeBuilder();
        contents.pr(PythonDockerGenerator.generateDockerFileContent(topLevelName, srcGenPath));
        try {
            // If a dockerfile exists, remove it.
            Files.deleteIfExists(srcGenPath.resolve(dockerFileName));
            contents.writeToFile(dockerFile);
        } catch (IOException e) {
            Exceptions.sneakyThrow(e);
        }
        System.out.println(getDockerBuildCommand(dockerFile, dockerComposeDir, federateName));
    }
@Override
public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) {
if (mainDef == null) {
return;
}
Path srcGenPath = fileConfig.getSrcGenPath();
String dockerFile = srcGenPath + File.separator + dockerFileName;
CodeBuilder contents = new CodeBuilder();
contents.pr(PythonDockerGenerator.generateDockerFileContent(topLevelName, srcGenPath));
try {
// If a dockerfile exists, remove it.
Files.deleteIfExists(srcGenPath.resolve(dockerFileName));
contents.writeToFile(dockerFile);
} catch (IOException e) {
Exceptions.sneakyThrow(e);
}
System.out.println(getDockerBuildCommand(dockerFile, dockerComposeDir, federateName));
}
@Override
public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) {
if (mainDef == null) {
return;
}
Path srcGenPath = fileConfig.getSrcGenPath();
String dockerFile = srcGenPath + File.separator + dockerFileName;
CodeBuilder contents = new CodeBuilder();
contents.pr(PythonDockerGenerator.generateDockerFileContent(topLevelName, srcGenPath));
try {
// If a dockerfile exists, remove it.
Files.deleteIfExists(srcGenPath.resolve(dockerFileName));
contents.writeToFile(dockerFile);
} catch (IOException e) {
Exceptions.sneakyThrow(e);
}
System.out.println(getDockerBuildCommand(dockerFile, dockerComposeDir, federateName));
}
@Override
public void writeDockerFile(File dockerComposeDir, String dockerFileName, String federateName) {
if (mainDef == null) {
return;
}
Path srcGenPath = fileConfig.getSrcGenPath();
String dockerFile = srcGenPath + File.separator + dockerFileName;
CodeBuilder contents = new CodeBuilder();
contents.pr(PythonDockerGenerator.generateDockerFileContent(topLevelName, srcGenPath));
try {
// If a dockerfile exists, remove it.
Files.deleteIfExists(srcGenPath.resolve(dockerFileName));
contents.writeToFile(dockerFile);
} catch (IOException e) {
Exceptions.sneakyThrow(e);
}
System.out.println(getDockerBuildCommand(dockerFile, dockerComposeDir, federateName));
}