docker-compose安装

yum install docker-compose-plugin

查看版本

docker compose version

创建 docker-compose.yml

version: "3.7"
services:
  jobmanager:
    image: flink:scala_2.12-java8
    ports:
      - "8081:8081"
    command: jobmanager
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
  taskmanager:
    image: flink:scala_2.12-java8
    depends_on:
      - jobmanager
    command: taskmanager
    scale: 3
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        taskmanager.numberOfTaskSlots: 2

执行 docker-compose.yml

docker compose up -d

你可能感兴趣的:(docker,容器,运维)