【容器镜像打包】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/
相关推荐
前端 贾公子9 小时前
小程序蓝牙打印探索与实践(下)
小程序·apache
DolphinScheduler社区11 小时前
Apache DolphinScheduler 3.4.2 正式发布!新增 Amazon EMR Serverless 插件,增强监控与补数据能力
大数据·云原生·serverless·apache·海豚调度·版本发版
前端 贾公子11 小时前
小程序蓝牙打印探索与实践(中)
apache
SeaTunnel11 小时前
87 个 PR 迭代复盘|Apache SeaTunnel 5 月版本重点更新解读
大数据·数据库·开源·apache·seatunnel
DolphinScheduler社区11 小时前
实战演示 | 基于 Apache DolphinScheduler 与 Apache SeaTunnel 实现 MySQL 到 Doris 离线定时增量同步
数据库·mysql·开源·apache·海豚调度·大数据工作流调度
chéng ௹12 小时前
uniapp封装火山引擎 DataRangers 埋点 SDK
uni-app·apache·火山引擎
阿坤带你走近大数据12 小时前
Apache Hop的详细介绍
apache
就叫_这个吧2 天前
servlet整合tomcat项目启动报错解决,org.apache.tomcat.util.descriptor.web.WebXml.setVersion
java·servlet·tomcat·apache
云器科技2 天前
Apache Iceberg-cpp:原生性能架构与演进路线
架构·apache
Par@ish2 天前
Ubuntu Apache日志存储周期变更
linux·ubuntu·apache