docker-compose
docker-compose 提供了基于docker编排功能
创建一个空文件夹
mkdir docker-compose-go
cd docker-compose-go创建
docker-compose.yml
文件,文件内容如下version: "2.1"
services:
jobmanager:
image: flink
expose:
- "6123"
ports:
- "8081:8081"
command: jobmanager
environment:
- JOB_MANAGER_RPC_ADDRESS=jobmanager
taskmanager:
image: flink
expose:
- "6121"
- "6122"
depends_on:
- jobmanager
command: taskmanager
links:
- "jobmanager:jobmanager"
environment:
- JOB_MANAGER_RPC_ADDRESS=jobmanager运行,-d是后台运行
docker-compose up -d
访问localhost:8081
本文标题:docker-compose
文章作者:Shea
原始链接:https://di1shuai.com/docker-compose.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!