lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.generator.docker.RtiDockerGenerator Class Reference

Generate a Dockerfile for building the rti provided by reactor-c. More...

Inherits org.lflang.generator.docker.CDockerGenerator.

Public Member Functions

String builderBase ()
 Return the base image to be used during the building stage.
List< String > defaultEntryPoint ()
 The default list of commands to construct an ENTRYPOINT out of.
String defaultImage ()
 Return the default base image.
DockerData generateDockerData ()
 Produce a DockerData object, which bundles all information needed to output a Dockerfile.
DockerData generateDockerData (Path path)
 Return a new DockerData object that can be used to generate a Dockerfile in the directory indicated by the given path.
 RtiDockerGenerator (LFGeneratorContext context)

Static Public Member Functions

static String argListToCommand (List< String > args)
 Convert an argument list, starting with the command to execute, into a string that can be executed by a POSIX-compliant shell.
static DockerGenerator dockerGeneratorFactory (LFGeneratorContext context)

Static Public Attributes

static final String DEFAULT_BASE_IMAGE = "alpine:latest"

Protected Member Functions

List< String > defaultBuildCommands ()
 Return the default compile commands for the C docker container.
List< String > entryPoint ()
 Return a list of strings used to construct and entrypoint.
String generateCopyForSources ()
 Return a COPY command for copying sources from host into container.
String generateCopyOfExecutable ()
 Return a COPY command to copy the executable from the builder to the runner.
String generateCopyOfScript ()
 Return a COPY command to copy the scripts from the builder to the runner.
String generateCopyOfUserFiles ()
 Return zero or more COPY commands to copy files specified using the files target property from the builder to the runner.
String generateDockerFileContent ()
 Generate the contents of the docker file.
String generateEntryPoint ()
 Return the ENTRYPOINT command.
String generateHeader ()
 Generate a header to print at the top of the Dockerfile.
String generateRunForBuild ()
 Return the Docker RUN command used for building.
String generateRunForInstallingDeps ()
 Return a RUN command for installing/checking build dependencies.
String generateRunForMakingExecutableDir ()
 Return a RUN command for making a directory to place executables in.
List< String > getBuildCommands ()
 Return the commands used to build.
final List< String > getEntryPointCommands ()
 Return a list of commands to be used to construct an ENTRYPOINT, taking into account the existence of a possible pre-run script.
List< String > getPostBuildCommand ()
 Return the command that sources the post-build script, if there is one.
List< String > getPreBuildCommand ()
 Return the command that sources the pre-build script, if there is one.
String runnerBase ()
 Return the base image to be used during the running stage.

Protected Attributes

final LFGeneratorContext context
 Configuration for interactions with the filesystem.

Detailed Description

Generate a Dockerfile for building the rti provided by reactor-c.

Author
Marten Lohstroh

Constructor & Destructor Documentation

◆ RtiDockerGenerator()

org.lflang.generator.docker.RtiDockerGenerator.RtiDockerGenerator ( LFGeneratorContext context)

Member Function Documentation

◆ argListToCommand()

String org.lflang.generator.docker.DockerGenerator.argListToCommand ( List< String > args)
staticinherited

Convert an argument list, starting with the command to execute, into a string that can be executed by a POSIX-compliant shell.

◆ builderBase()

String org.lflang.generator.docker.RtiDockerGenerator.builderBase ( )

Return the base image to be used during the building stage.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

◆ defaultBuildCommands()

List< String > org.lflang.generator.docker.CDockerGenerator.defaultBuildCommands ( )
protectedinherited

Return the default compile commands for the C docker container.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

◆ defaultEntryPoint()

List< String > org.lflang.generator.docker.CDockerGenerator.defaultEntryPoint ( )
inherited

The default list of commands to construct an ENTRYPOINT out of.

Different for each target.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

Reimplemented in org.lflang.generator.docker.PythonDockerGenerator.

◆ defaultImage()

String org.lflang.generator.docker.CDockerGenerator.defaultImage ( )
inherited

Return the default base image.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

Reimplemented in org.lflang.generator.docker.PythonDockerGenerator.

◆ dockerGeneratorFactory()

DockerGenerator org.lflang.generator.docker.DockerGenerator.dockerGeneratorFactory ( LFGeneratorContext context)
staticinherited

◆ entryPoint()

List< String > org.lflang.generator.docker.DockerGenerator.entryPoint ( )
protectedinherited

Return a list of strings used to construct and entrypoint.

If this is done for a federate, then also include additional parameters to pass in the federation ID.

◆ generateCopyForSources()

String org.lflang.generator.docker.DockerGenerator.generateCopyForSources ( )
protectedinherited

Return a COPY command for copying sources from host into container.

Reimplemented in org.lflang.generator.docker.TSDockerGenerator.

◆ generateCopyOfExecutable()

String org.lflang.generator.docker.DockerGenerator.generateCopyOfExecutable ( )
protectedinherited

Return a COPY command to copy the executable from the builder to the runner.

Reimplemented in org.lflang.generator.docker.PythonDockerGenerator, and org.lflang.generator.docker.TSDockerGenerator.

◆ generateCopyOfScript()

String org.lflang.generator.docker.DockerGenerator.generateCopyOfScript ( )
protectedinherited

Return a COPY command to copy the scripts from the builder to the runner.

◆ generateCopyOfUserFiles()

String org.lflang.generator.docker.DockerGenerator.generateCopyOfUserFiles ( )
protectedinherited

Return zero or more COPY commands to copy files specified using the files target property from the builder to the runner.

◆ generateDockerData() [1/2]

DockerData org.lflang.generator.docker.DockerGenerator.generateDockerData ( )
inherited

Produce a DockerData object, which bundles all information needed to output a Dockerfile.

Returns
docker data created based on the context in this instance

◆ generateDockerData() [2/2]

DockerData org.lflang.generator.docker.DockerGenerator.generateDockerData ( Path path)
inherited

Return a new DockerData object that can be used to generate a Dockerfile in the directory indicated by the given path.

Parameters
pathThe directory in which to place the generated Dockerfile.

◆ generateDockerFileContent()

String org.lflang.generator.docker.RtiDockerGenerator.generateDockerFileContent ( )
protected

Generate the contents of the docker file.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

◆ generateEntryPoint()

String org.lflang.generator.docker.DockerGenerator.generateEntryPoint ( )
protectedinherited

Return the ENTRYPOINT command.

◆ generateHeader()

String org.lflang.generator.docker.DockerGenerator.generateHeader ( )
protectedinherited

Generate a header to print at the top of the Dockerfile.

◆ generateRunForBuild()

String org.lflang.generator.docker.DockerGenerator.generateRunForBuild ( )
protectedinherited

Return the Docker RUN command used for building.

◆ generateRunForInstallingDeps()

String org.lflang.generator.docker.CDockerGenerator.generateRunForInstallingDeps ( )
protectedinherited

Return a RUN command for installing/checking build dependencies.

Reimplemented from org.lflang.generator.docker.DockerGenerator.

◆ generateRunForMakingExecutableDir()

String org.lflang.generator.docker.DockerGenerator.generateRunForMakingExecutableDir ( )
protectedinherited

Return a RUN command for making a directory to place executables in.

Reimplemented in org.lflang.generator.docker.TSDockerGenerator.

◆ getBuildCommands()

List< String > org.lflang.generator.docker.DockerGenerator.getBuildCommands ( )
protectedinherited

Return the commands used to build.

◆ getEntryPointCommands()

final List< String > org.lflang.generator.docker.DockerGenerator.getEntryPointCommands ( )
protectedinherited

Return a list of commands to be used to construct an ENTRYPOINT, taking into account the existence of a possible pre-run script.

◆ getPostBuildCommand()

List< String > org.lflang.generator.docker.DockerGenerator.getPostBuildCommand ( )
protectedinherited

Return the command that sources the post-build script, if there is one.

◆ getPreBuildCommand()

List< String > org.lflang.generator.docker.DockerGenerator.getPreBuildCommand ( )
protectedinherited

Return the command that sources the pre-build script, if there is one.

◆ runnerBase()

String org.lflang.generator.docker.DockerGenerator.runnerBase ( )
protectedinherited

Return the base image to be used during the running stage.

Member Data Documentation

◆ context

final LFGeneratorContext org.lflang.generator.docker.DockerGenerator.context
protectedinherited

Configuration for interactions with the filesystem.

◆ DEFAULT_BASE_IMAGE

final String org.lflang.generator.docker.CDockerGenerator.DEFAULT_BASE_IMAGE = "alpine:latest"
staticinherited

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/docker/RtiDockerGenerator.java