【容器镜像打包】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/
相关推荐
Zhu7583 小时前
【软件部署】用docker部署Apache Kafka 集群架构isolated模式带SSL
docker·kafka·apache
一个天蝎座 白勺 程序猿3 小时前
Apache IoTDB(16):时序数据库的数据删除从单点精准清除到企业级数据生命周期管理
数据库·apache·时序数据库·iotdb
Zhu7583 小时前
【软件部署】用docker部署Apache Kafka 集群架构的isolated模式
docker·kafka·apache
一个天蝎座 白勺 程序猿13 小时前
Apache IoTDB(15):IoTDB查询写回(INTO子句)深度解析——从语法到实战的ETL全链路指南
数据库·apache·etl·iotdb
微学AI20 小时前
2026年时序数据库选型指南:Apache IoTDB从大数据与物联网视角深度剖析
apache·时序数据库·iotdb
路baby2 天前
Pikachu安装过程中常见问题(apache和MySQL无法正常启动)
计算机网络·mysql·网络安全·adb·靶场·apache·pikachu
努力打怪升级2 天前
Apache HTTP Server 2.4 Windows 版完整配置与运维手册
运维·http·apache
航Hang*3 天前
第2章:进阶Linux系统——第10节:Linux 系统编程与 Shell 脚本全解笔记(GCC+Make+Vim+Shell Script)
linux·运维·服务器·学习·vim·apache·vmware
倔强的石头1063 天前
时序数据库选型指南:可视化与分析协同怎么选?——以 Apache IoTDB + Grafana + 大数据引擎为例
apache·时序数据库·iotdb