本文共 1342 字,大约阅读时间需要 4 分钟。
docker-entrypoint.sh
#!/bin/bashset -eexec "$@"
start.sh
#!/usr/bin/env bashbin/start-cluster.shwhile truedo echo "=======" sleep 60sdone
FROM lynn/jdk:1.8.0_172LABEL maintainer="Lynn Yuan"ENV FLINK_HOME /flinkENV FLINK_VERSION 1.7.1ENV HADOOP_VERSION 27ENV TAR flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_2.11.tgzENV TAR_URL http://mirrors.hust.edu.cn/apache/flink/flink-${FLINK_VERSION}/${TAR}ENV PATH ${FLINK_HOME}/bin:$PATHRUN set -x \ && apt-get update \ && apt-get install -y wget vim curl net-tools telnet procps nmap\ && wget ${TAR_URL}RUN set -x \ && mkdir ${FLINK_HOME}\ && tar zxvf ${TAR} -C ${FLINK_HOME} \ && mv ${FLINK_HOME}/flink-${FLINK_VERSION}/* ${FLINK_HOME} \ && rm -rf ${FLINK_HOME}/flink-${FLINK_VERSION} \ && rm -rf ${TAR}ADD docker-entrypoint.sh /docker-entrypoint.shADD start.sh /start.shRUN set -x \ && chmod +x /docker-entrypoint.sh \ && chmod +x /start.shWORKDIR ${FLINK_HOME}ENTRYPOINT ["/docker-entrypoint.sh"]CMD ["/start.sh"]EXPOSE 8081EXPOSE 6123
docker build --rm -t lynn/flink:1.7.1 .
docker run -idt --name=flink --hostname flink-node -p 18081:8081 lynn/flink:1.7.1
在浏览器中输入如下Url:
截图如下:
转载于:https://blog.51cto.com/1196740/2335133