Skip to main content
CommunityTeamEnterprise

Docker

info

Flex Docker images are hosted at Docker Hub.

To connect the latest Flex Docker image to a Flink cluster:

  • Get a Community or Free trial license. See: Trials and Licenses.
  • Create a configuration file (config.env) that contains your connection, license, and feature variables.
  • Start a Docker container using the appropriate Flex image.

Start a Flex instance

Below is a sample config.env file that defines your Flink connection and Flex instance settings. Make sure to include valid license details from your license email. For a full list of supported options, see the environment variables reference.

## Name your Flex installation (this appears in the UI)
FLINK_ENVIRONMENT_NAME=Trade Book (Staging)
## The Flink REST API to connect to:
FLINK_REST_URL=http://jobmanager:8081

## Your license details (Required).
## These parameters can be cut/paste from your license email
LICENSE_ID=1c99v4-f690-4a4f-b144-73de2369444a
LICENSE_CODE=FLEX_COMMUNITY
LICENSEE=My Corp
LICENSE_EXPIRY=2020-09-05
LICENSE_SIGNATURE=15CFFF969111DB6DCA142B6F1E0065F94A614251B80128D52C2CD45993A021AE10E90F57B90FF76CC1B992C16E54BCF1CBE7E5EE3124B3E585BE133774836A6EBB51B55E67EF60F4A435EBEC9F07A26CEABDCF6E3CF4137A33201E7662AF1F7986E57341E0EAEB884BBF320C348D62679F521259DAD1E03F6F79DB53D83CD41B

With your configuration file in place, start Flex using the following command:

docker run -p 3000:3000 --env-file ./config.env -m 2G factorhouse/flex-ce:latest

Once running, Flex will be available at http://localhost:3000.

Accessing files on the host machine

Sometimes Flex needs access to files from the host machine—for example:

  1. RBAC YAML configuration
  2. Keystore or Truststore files
  3. Metadata.xml for SSO integration

You can expose these files to the container using a volume mount:

docker run --volume="$PWD/config:/config" -p 3000:3000 \
--env-file ./config.env -m 4G factorhouse/flex:latest

In config.env, reference the files using their mounted path:

SSL_TRUSTSTORE_LOCATION=/config/ssl/truststore.jks

To connect Flex with a Flink cluster running inside Docker, it's recommended to use a dedicated Docker network. This allows containers to reference each other by hostname.

## Create a docker network to be shared
docker network create factorhouse

## Start a Flink job manager
docker run -d -p 8081:8081 --hostname jobmanager --network factorhouse \
-v ./flink-conf.yaml:/opt/flink/conf/flink-conf.yaml:ro \
flink:1.20.1

## Start a Flex instance
docker run -d -p 3000:3000 --network factorhouse \
--env-file=./config.env \
factorhouse/flex:latest
tip

Make sure to include FLINK_REST_URL=http://jobmanager:8081 in your config.env file so Flex can connect to the Kafka broker using the internal Docker hostname.