version: "3"
services:
FlinkJobManager: # define the job manager service
image: flink:1.14.4-scala_2.12-java8
container_name: FlinkJobManager
hostname: FlinkJobManager
expose:
- "6123"
ports:
- "8081:8081" # map port 8081 of container to port 8081 of localhost
command: jobmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: FlinkJobManager
FlinkTaskManager: # define the task manager service
image: flink:1.14.4-scala_2.12-java8
#container_name: FlinkTaskManager
#hostname: FlinkTaskManager
expose:
- "6121"
- "6122"
depends_on:
- FlinkJobManager # ensure the sequence of docker composing
command: taskmanager
scale: 2 # replica
links:
- "FlinkJobManager:jobmanager" # link to job manager service
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: FlinkJobManager
taskmanager.numberOfTaskSlots: 2
docker-compose 安装 flink
最新推荐文章于 2024-09-23 06:00:00 发布