【容器镜像打包】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/
相关推荐
数智启示录20 小时前
Apache Kafka Consumer 扩到 40 个仍不提速:Partition 上限锁死有效并行度 【Kafka合集】
数据库·经验分享·分布式·缓存·面试·kafka·apache
数智启示录20 小时前
Apache Kafka 幂等 Producer 的边界:Exactly-Once 到了 MySQL 为什么失效 【Kafka合集】
数据库·经验分享·分布式·mysql·面试·kafka·apache
数智启示录20 小时前
Apache Kafka 不只是消息队列:日志与 Offset 分离如何让事件可重放 【Kafka合集】
经验分享·分布式·面试·kafka·apache
数智启示录20 小时前
Apache Kafka 同 Key 仍会乱序:从分区 Offset 到业务可见的四道边界 【Kafka 合集】
大数据·数据库·经验分享·分布式·面试·kafka·apache
吴声子夜歌20 小时前
ApacheCommons——commons-lang3(Java 基础语言增强)(二)
java·开发语言·apache
2601_967019512 天前
企业网站SSL证书选型实战,少走弯路
apache
betazhou2 天前
Apache Seatunnel 抽取Oracle数据库测试
数据库·oracle·apache·seatunnel
微软技术分享3 天前
Apache 2.4.68 编译安装与配置
人工智能·apache·知识图谱
DolphinScheduler社区3 天前
把 Apache DolphinScheduler 变成 Agent 的“手和脚”:从调度平台到自然语言数据入口
人工智能·开源·apache·agent·技术分享·海豚调度·大数据工作流调度
EEEEEEcho4 天前
为什么/admin Apache 返回 301 重定向,但是/admin/ 直接处理请求
apache