【容器镜像打包】Apache Seatunnel打包容器镜像

说明

参考官网方法打包容器镜像

仅供参考,若自定义开发,需改造Dockerfile

容器镜像加速参考1ms.run

给k8s环境使用

创建Dockerfile,删掉注释后使用

bash 复制代码
FROM seatunnelhub/openjdk:8u342
# 自定义期望使用的版本
ENV SEATUNNEL_VERSION="2.3.13"
ENV SEATUNNEL_HOME="/opt/seatunnel"

RUN wget https://dlcdn.apache.org/seatunnel/${SEATUNNEL_VERSION}/apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
RUN tar -xzvf apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
RUN mv apache-seatunnel-${SEATUNNEL_VERSION} ${SEATUNNEL_HOME}
RUN mkdir -p $SEATUNNEL_HOME/logs
RUN cd ${SEATUNNEL_HOME} && sh bin/install-plugin.sh ${SEATUNNEL_VERSION}
# 可选。在本地创建目录JDBC,访问网站下载期望使用的数据库驱动, https://seatunnel.apache.org/docs/2.3.13/connectors/source/Jdbc#parallel-reader
COPY JDBC/* /opt/seatunnel/plugins/
COPY JDBC/* /opt/seatunnel/lib/
# 可选。创建目录driver,存放各类自定义的jar文件。
COPY driver/* /opt/seatunnel/lib/

给Docker环境用

创建Dockerfile,删掉注释后使用

bash 复制代码
FROM seatunnelhub/openjdk:8u342

ARG VERSION
# Build from Source Code And Copy it into image
COPY ./target/apache-seatunnel-${VERSION}-bin.tar.gz /opt/

# Download From Internet
# Please Note this file only include fake/console connector, You'll need to download the other connectors manually
# wget -P /opt https://dlcdn.apache.org/seatunnel/${VERSION}/apache-seatunnel-${VERSION}-bin.tar.gz

RUN cd /opt && \
    tar -zxvf apache-seatunnel-${VERSION}-bin.tar.gz && \
    mv apache-seatunnel-${VERSION} seatunnel && \
    rm apache-seatunnel-${VERSION}-bin.tar.gz && \
    sed -i 's/#rootLogger.appenderRef.consoleStdout.ref/rootLogger.appenderRef.consoleStdout.ref/' seatunnel/config/log4j2.properties && \
    sed -i 's/#rootLogger.appenderRef.consoleStderr.ref/rootLogger.appenderRef.consoleStderr.ref/' seatunnel/config/log4j2.properties && \
    sed -i 's/rootLogger.appenderRef.file.ref/#rootLogger.appenderRef.file.ref/' seatunnel/config/log4j2.properties && \    
    cp seatunnel/config/hazelcast-master.yaml seatunnel/config/hazelcast-worker.yaml

WORKDIR /opt/seatunnel
# 可选。在本地创建目录JDBC,访问网站下载期望使用的数据库驱动, https://seatunnel.apache.org/docs/2.3.13/connectors/source/Jdbc#parallel-reader
COPY JDBC/* /opt/seatunnel/plugins/
COPY JDBC/* /opt/seatunnel/lib/
# 可选。创建目录driver,存放各类自定义的jar文件。
COPY driver/* /opt/seatunnel/lib/
相关推荐
DolphinScheduler社区1 天前
DolphinScheduler 3.3.2 如何调用 DataX 3.0 + SeaTunnel 2.3.12?附 Demo演示!
java·spark·apache·海豚调度·大数据工作流调度
YaBingSec2 天前
玄机网络安全靶场:Apache HTTPD 解析漏洞(CVE-2017-15715)WP
java·笔记·安全·web安全·php·apache
SuperherRo3 天前
服务攻防-中间件安全&Apache&Tomcat&Jetty&Weblogic&AJP协议&反序列化&CVE漏洞
中间件·tomcat·apache·jetty·weblogic
回忆2012初秋3 天前
时序库.net平台下的推荐 SonnetDB,一文分析清除他与Apache IoTDB的区同
apache·iotdb
家有娇妻张兔兔4 天前
Apache POI 导出 Word 踩坑实录:Word 分栏为什么做不好左右平铺
c#·word·apache·poi·分栏
HashData酷克数据4 天前
官宣:Apache Cloudberry (Incubating) 2.1.0 正式发布!
apache
weixin_394758034 天前
直播间小程序码生成问题修复代码清单
android·小程序·apache
YaBingSec5 天前
玄机靶场—Apache-druid(CVE-2021-25646) WP
java·开发语言·笔记·安全·php·apache
回忆2012初秋7 天前
.NET 时序数据操作实战:Apache IoTDB连接与 CRUD 完全指南
.net·apache·iotdb
weixin_430750937 天前
部署FreeRadius+php+apache+mariaDB+daloradius 实现认证计费功能
php·apache·mariadb·daloradius·freeradius