Building Flogo App Executable and Docker Image Using Flogo - App Build CLI
TIBCO Flogo® - App Build Command Line Interface is a command-line utility for building Flogo applications, especially in CI/CD pipelines. It provides a consistent and easy-to-use interface for building and testing Flogo applications.
-
All the app executables created from the Linux build of Flogo - App Build CLI are production binaries and require a valid license file to run.
-
Before running Flogo - App Build CLI commands, set the environment variable
FLOGO_APP_BUILD_LOG=true. This generates abuild.logfile for VS Code builds, which is helpful for diagnosing failures. You can set this variable system-wide so it persists across all sessions, or you can export it in the terminal for the specific session.
Flogo® - App Build Command Line Interface (CLI) Usage
-
Build Flogo application executables (
.exe) on Windows, Linux, or Darwin platforms. -
Test Flogo applications using Flogo app files (
.flogoor.json), Flogo app executables, and.flogotestfiles. -
Build Docker images for your Flogo applications.
-
Package Flogo executables into Docker images.
-
Build TIBCO Control Plane deployment ZIP files for your Flogo applications.
-
Export build configuration to select connectors and enable or disable Flogo integrations for multi-application executables.
-
Build Flogo multi-application executable with connectors specified in the build configuration file.
"Host OS is not Linux. Building non-production binary."
Flogo - App Build CLI Commands
flogobuild
Usage
flogobuild [COMMAND]
Flogo Context Commands
| Command | Description |
|---|---|
create-context
|
Creates a context for building and packaging Flogo applications. |
delete-context
|
Deletes an existing context. |
list-context
|
Lists available contexts. |
set-default-context
|
Sets one of the configured contexts as the default for building and packaging Flogo applications. |
Flogo App Commands
| Command | Description |
|---|---|
build-exe
|
Builds a Flogo application executable. |
test-app
|
Runs unit test cases. |
build-multiapp-exe
|
Builds a multiapp executable from a build-configuration file. The executable can run any Flogo application whose connectors are a subset of those compiled in; the application is supplied at runtime with --app. |
Flogo Docker Commands
| Command | Description |
|---|---|
build-docker-image
|
Builds a Flogo application Docker image. |
package-docker-image
|
Packages an existing Linux-based Flogo application executable as a Docker image. |
TIBCO Platform - Flogo Commands
| Command | Description |
|---|---|
build-tp-deployment
|
Builds a TIBCO Control Plane deployment ZIP file for the Flogo application. |
Flogo Utility Command
| Command | Description |
|---|---|
generate-build-config
|
Exports a build-configuration file used to select the Flogo connectors to include in the multiapp executable and to enable or disable Flogo integrations. |
Additional Commands
| Command | Description |
|---|---|
help
|
Displays help about any command. |
version
|
Displays the version. |
Global Flags
| Flag | Description |
|---|---|
--debug
|
Enables debug mode for detailed logging. |
-h, --help
|
Help for flogobuild. |
--verbose
|
Enables verbose mode to display additional output. |
create-context
Usage
flogobuild create-context [flags]
Available Flags
| Flags | Description |
|---|---|
-n, --context-name
|
This flag is required. Specify the name of the context. |
-e, --ems-home-directory
|
Specify the path to the EMS home directory. |
-h, --help
|
Displays help for create-context. |
-i, --ibmmq-home-directory
|
Specify the path to the IBM MQ home directory. |
--set-default
|
Sets the new context as default. |
-u, --user-extension-directory
|
Specify the path to the user extension directory. |
-v, --vsc-extension-file
|
This flag is required. Specify the path to the Flogo VS Code extension VSIX file. |
/home/<user-name>/tibco/.fecli. To override this default directory, set the FLOGO_CLI_CTX_DIR environment variable and specify the desired destination directory for storing the context.Example
flogobuild create-context --context-name "<context-name>" --vsc-extension-file "<path-to-vsc-file>\<.vsix file>" --user-extension-directory "<extension-directory>" --ems-home-directory "<ems-home-directory>" --ibmmq-home-directory "<ibmq-home-directory>"
build-docker-image
Usage
flogobuild build-docker-image [flags]
Available Flags
| Flag | Description |
|---|---|
-f , --app-json-file
|
This flag is required. Specify the path to the Flogo application file ( |
-c, --context-name
|
Specify the name of the context to be used for building applications. If not provided, the default context is used. |
-d, --docker-file
|
Specify the path to the Flogo application Dockerfile. |
-i, --docker-image-name
|
This flag is required. Specify the Docker image name and tag, for example, |
-n, --exe-name
|
Specify the name of the executable file. If not provided, the app name is used as the executable file name. |
-h, --help
|
Displays help for build-docker-image. |
-o, --output-directory
|
Specify the directory where the executable file is to be created. If not provided, the executable is created in the current directory. |
Example
flogobuild build-docker-image -f "<path-to-flogo-app-file>" -i "<docker-img-name>" -c "<context-name>" -n "<executable-file-name>" -o "<path-for-exe-file>" -d "<path-for-dockerfile>"
build-exe
Usage
flogobuild build-exe [flags]
Available Flags
| Flag | Description |
|---|---|
-f, --app-json-file
|
This flag is required. Specify the path to the Flogo application file ( |
-c, --context-name
|
Specify the name of the context to be used for building applications. If not provided, the default context is used. |
-n, --exe-name
|
Specify the name of the executable file. If not provided, the app name is used as the executable file name. |
-h, --help
|
Displays help for build-exe. |
-l, --license-file string
|
Path for license file. Note:
|
-o, --output-directory
|
Specify the directory where the executable file is to be created. If not provided, the executable is created in the current directory. |
-p, --platform
|
Specify the platform type for the app executable. Specify a value in GOOS/GOARCH format. For example, ["linux/amd64", "windows/amd64", "darwin/amd64", "darwin/arm64"]. |
Example
flogobuild build-exe -f "<path-to-flogo-app-file>" -c "<context-name>" -n "<executable-file-name>" -o "<path-for-exe-file>"
build-tp-deployment
build-tp-deployment command, then import the .zip file generated by that command into TIBCO Control Plane. For more information, see Deploying a Flogo App using Custom Application Image.Usage
flogobuild build-tp-deployment [flags]
Available Flags
| Flag | Description |
|---|---|
-f, --app-json-files
|
This flag is required. Specify the path to the Flogo application file ( |
-b, --build-name
|
Helps to identify the builds with user given name on TIBCO Control Plane. |
-i, --container-image-name
|
Specify the name of the fully qualified custom container image for the flogo app. |
-c, --context-name
|
Specify the name of the context to be used for building applications. If not provided, the default context is used. |
-h, --help
|
Displays help for build-exe. |
-l, --license-file string
|
Path for license file. Note:
|
-o, --output-directory
|
This flag is required. Specify the directory where the deployment zip is to be created. |
-t, --tags
|
Specify a comma-separated list of tags for the deployment. |
-z, --zipfile-name
|
Specify the name of the zip file to be created. If not provided, build.zip is used. |
Example
flogobuild build-tp-deployment -f "<path-to-flogo-app-file>" -c "<context-name>" -o "<path-for-zip-file>" -t "<tag1, tag2>" -z "<zip-file-name>" -i "<fully-qualified-custom-container-image-name>"
generate-build-config
Generates a build-configuration file (YAML) listing the Flogo connectors and integrations available for the context. Edit this file to select which connectors are compiled into the Multiapp executable, then pass it to build-multiapp-exe.
Usage
flogobuild generate-build-config [flags]
Available Flags
| Flag | Description |
|---|---|
-c, --context-name
|
Name of the context to use. If omitted, the default context is used. |
-f, --fileName
|
Name of the build-configuration file to create in the output directory (for example, build-config.yaml). This is a file name, not a path; the file is created inside the -o directory. If omitted, the CLI writes the build-configuration file with its default name. |
-h, --help
|
Displays help for generate-build-config. |
-o, --output-directory
|
Directory in which the build-configuration file is created. Defaults to the current directory. |
Sample build-configuration file
configuration:
integrations:
- opentelemetry
generateBuildLog: true
multiapp-exe:
flogoConnectors:
- name: General
- name: HTTP
- name: File
-
To include only the connectors you need in the Multiapp executable, remove the others from
flogoConnectors. SetgenerateBuildLog: trueto havebuild-multiapp-exewrite a build log next to the executable. -
Connectors that require native libraries have an
installationHomeplaceholder in the generated build configuration. To include such a connector, set itsinstallationHometo the path of the native libraries so they are compiled into the Multiapp executable. For example:configuration: multiapp-exe: flogoConnectors: - name: General - name: EMS installationHome: /opt/tibco/ems/10.3
Example
flogobuild generate-build-config -c "<context-name>" -f "<build-config-file-name>" -o "<path-to-output-directory>"
build-multiapp-exe
Builds a Multiapp executable from a build-configuration file. The executable contains only the connectors selected in the configuration and can run any Flogo application whose connectors are a subset of those. The application is not embedded; it is supplied at runtime with --app. No license is embedded; licensing is applied at runtime through TIB_ACTIVATION.
Usage
flogobuild build-multiapp-exe [flags]
Available Flags
| Flag | Description |
|---|---|
-y, --build-config-file
|
This flag is required. Path to the build-configuration file produced by |
-c, --context-name
|
Name of the context to use. If omitted, the default context is used. |
-n, --exe-name
|
Name of the executable to create. If omitted, the app name is used. |
-h, --help
|
Displays help for build-multiapp-exe. |
-o, --output-directory
|
Directory in which the executable is created. Defaults to the current directory. |
-p, --platform string |
Platform (OS) type for the app executable. Specify the value in GOOS/GOARCH format. For example, ["linux/amd64","windows/amd64","darwin/amd64","darwin/arm64"]. If not provided, the app is built for the current platform where the CLI is running. |
Example
flogobuild build-multiapp-exe -c "<context-name>" -y "<Path-for-Build-Config-file>" -n "<executable-name>" -o "<path-to-output-directory>"
build-exe, build-multiapp-exe has no -p/--platform flag (cross-platform build is not supported) and no -l/--license-file flag (the license is applied at runtime through TIB_ACTIVATION).Running an Application with the Multiapp Executable
Because the application and the license are supplied at runtime, run the Multiapp executable as follows:
TIB_ACTIVATION=/path/to/FlogoLicense.bin ./multiapp_exe --app /path/to/myapp.flogo
-
--app <app.flogo>selects the application to run. -
TIB_ACTIVATIONpoints to the Flogo license file used to activate the runtime.
Limitations
-
Unsupported triggers and activities: The Lambda trigger, gRPC trigger, and the gRPC (Invoke) activity are not supported. An application that uses any of these is rejected at runtime.
-
Connector version compatibility: If an application was built against a connector version newer than the version compiled into the Multiapp executable, the runtime reports an error. Rebuild the Multiapp executable to include the newer connector version.
delete-context
Usage
flogobuild delete-context [flags]
Available Flags
| Flag | Description |
|---|---|
-c, --context-name
|
This flag is required. Specify the name of the context to be deleted. |
--delete-all
|
Delete all context. |
-h, --help
|
Displays help for delete-context. |
Example
flogobuild delete-context -c <context-name>
list-context
| Flag | Description |
|---|---|
-h, --help
|
Help for list-context. |
-q, --quiet |
Show only context names. |
Example
flogobuild list-context
Example
Display only the context names using the -q flag
flogobuild.exe list-context -q
package-docker-image
Usage
flogobuild package-docker-image [flags]
Available Flags
| Flag | Description |
|---|---|
-d, --docker-file
|
Specify the path to the Flogo application Dockerfile. |
-i, --docker-image-name
|
This flag is required. Specify the Docker image name and tag. |
-n, --exe-name
|
This flag is required. Specify the path to the executable file. |
-h, --help
|
Displays help for package-docker-image. |
Example
flogobuild package-docker-image --docker-image-name "<docker-image-name>" --exe-name "<path-to-exe-file>" -d "<path-to-dockerfile>"
set-default-context
Usage
flogobuild set-default-context [flags]
Available Flags
| Flag | Description |
|---|---|
-c, --context-name
|
This flag is required. Specify the name of the context to be set as default. |
-h, --help
|
Displays help for set-default-context. |
Example
flogobuild set-default-context -c <Context-name>
test-app
Usage
flogobuild test-app [flags]
Available Flags
| Flag | Description |
|---|---|
-e, --app-exe-file
|
Specify the path to the executable file to be tested. This parameter is required if the --app-json-file flag is not provided. |
-a, --app-json-file
|
Specify the path to the Flogo application file (.json/.flogo). This parameter is required if the --app-exe-file flag is not provided. |
-p, --app-props-file
|
Specify the path to the application property file. |
-c, --context-name
|
Specify the name of the context to be used for building applications. If not provided, the default context is used. |
-v, --env-vars-file
|
Specify the path to the environment variable property file. |
-h, --help
|
Displays help for test-app. |
-d, --output-directory
|
Specify the path to the output directory. |
-o, --output-file
|
Specify the name of the output file. |
-f, --test-file
|
This flag is required. Specify the path to the test file. |
-t, --test-suites
|
Specify a comma-separated list of test suites to run. |
Example
flogobuild test-app --app-exe-file "<path-to-exe-file>" --test-file "<path-to-test-files>" --context-name "<Context-name>" --output-directory "<path-to-output-dir>" --output-file "<output-file-name>" --test-suites "<Testsuite_1,Testsuite_2>" --app-props-file "<path-to-app-prop-file>/<prop-file>" --env-vars-file "<path-to-env-file>/<env-file>"
Generating Linux ARM-Based Build Executables from Linux AMD64
This topic describes how to perform cross-compilation to generate Linux ARM architecture executables for TIBCO Flogo® apps while working on a Linux AMD64 build environment.
-
Ensure that you have the gcc compiler installed on your Linux AMD64 machine. You can install it using the following command:
apt-get install gcc-aarch64-linux-gnu
-
Ensure that your Flogo app does not contain the following connectors or supplements, as they are not supported for Linux ARM cross-compilation:
-
TIBCO Enterprise Message Service™ (EMS) (The EMS supplement is not available for ARM architecture).
-
TIBCO Data Virtualization (TDV) connector.
-
SAP Solution connector (The NWRFCSdk official supplement is not available for Linux ARM64).
-
- Procedure
-
Open your command-line interface on the Linux AMD64 machine.
-
Run the flogobuild command with the -p linux/arm64 option to specify the target platform. Use the following syntax:
flogobuild build-exe -f "<path-to-flogo-app-file>" -c "<context-name>" -n "<executable-file-name>" -o "<path-for-exe-file>" -p linux/arm64
Building Linux ARM64 Docker Images
This feature allows you to generate Linux ARM64 compatible Docker images directly from a Linux AMD64 build environment. This section describes how to cross-compile a Flogo application into a Linux ARM64 executable from a Linux AMD64 environment and package it into a compatible Docker image using the flogobuild tool and docker buildx.
-
You must have the
flogobuildCLI tool and Docker installed and accessible in your environment. -
Ensure that your application does not contain the following components, as they are not supported for ARM64 cross-compilation:
-
TIBCO Enterprise Message Service™ (EMS)
-
TIBCO Data Virtualization (TDV) Connector
-
SAP Solution Connector (due to the unavailability of the NWRFC SDK supplement for Linux ARM64)
-
- Procedure
-
Open your terminal and run the following command to cross-compile your application.
Ensure you set-p linux/arm64to target the ARM architecture.bash flogobuild build-exe -f "<path-to-flogo-app-file>" \ -c "<context-name>" \ -n "<executable-file-name>" \ -o "<path-for-exe-file>" \ -p linux/arm64where:
-
-fis the path to your Flogo application JSON file. -
-cis the build context name. -
-nis the desired name for the output executable. -
-ois the output directory path. -
-pis the target platform. It must belinux/arm64.
-
-
Navigate to the directory where the executable was generated in the previous step.
-
Create a file named
Dockerfilein this directory. -
Add the following sample configuration to the
Dockerfile.
This configuration uses a Debian-based Golang image, installs the necessary cross-compiler, and sets up the executable.Dockerfile
# Use a specific version of Golang as the base image
FROM golang:1.25.3-bookworm AS builder
WORKDIR /build
# Install the ARM64 GCC cross-compiler
RUN apt-get update && apt-get install -y gcc-aarch64-linux-gnu
# Copy the executable generated in Step 1 (Replace 'rest' with the actual executable name)
COPY rest
# Ensure the binary is executable
RUN chmod +x rest
# Entry point configuration would go here (e.g., CMD ["./rest"]) -
Build the final Docker image targeting the ARM64 platform by running the following command:
bash
docker buildx build --platform linux/arm64 -t <imageName>:<imageTag>