Skip to content

Commit 631ea2c

Browse files
authored
[Bug][docker] fix scaleph-seatunnel docker image build error (#601)
* feature: update seatunnel Dockerfile and github actions * feature: update seatunnel version to 2.3.2 * fix: scaleph seatunnel docker build error
1 parent ff8513a commit 631ea2c

File tree

5 files changed

+68
-88
lines changed

5 files changed

+68
-88
lines changed

.github/workflows/docker-seatunnel.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ on:
2222
seatunnelVersion:
2323
description: 'seatunnel version'
2424
required: true
25-
default: '2.3.1'
25+
default: '2.3.2'
2626
type: choice
2727
options:
2828
- 2.3.2
29-
- 2.3.1
3029
flinkVersion:
3130
description: 'flink version'
3231
required: true
@@ -63,13 +62,18 @@ jobs:
6362
platforms: amd64,arm64
6463
- name: Set up Docker Buildx
6564
uses: docker/setup-buildx-action@v2
65+
- name: Install SeaTunnel
66+
run: wget https://archive.apache.org/dist/seatunnel/${{ env.SEATUNNEL_VERSION }}/apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin.tar.gz ; \
67+
tar -zxf apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin.tar.gz ; \
68+
cd apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin ; \
69+
sh -x bin/install-plugin.sh ${{ env.SEATUNNEL_VERSION }}
6670
- name: Build image
6771
uses: docker/build-push-action@v4
6872
with:
6973
no-cache: false
7074
push: true
7175
context: .
72-
build-args: FLINK_VERSION=${{ env.FLINK_VERSION }}
76+
build-args: FLINK_VERSION=${{ env.FLINK_VERSION }}, SEATUNNEL_VERSION=${{ env.SEATUNNEL_VERSION }}
7377
platforms: linux/amd64,linux/arm64
7478
file: tools/docker/build/scaleph-seatunnel/Dockerfile
7579
tags: ${{ env.HUB }}:${{ env.SEATUNNEL_VERSION }}-flink-${{ env.FLINK_VERSION }}

scaleph-common/src/main/java/cn/sliew/scaleph/common/dict/seatunnel/SeaTunnelVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
2929
public enum SeaTunnelVersion implements DictInstance {
3030

31-
V_2_3_1("2.3.1", "2.3.1"),
31+
V_2_3_2("2.3.2", "2.3.2"),
3232
;
3333

3434
@JsonCreator

tools/docker/build/scaleph-seatunnel/Dockerfile

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,14 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
ARG FLINK_VERSION=1.17
18-
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
19-
FROM maven:3.8-eclipse-temurin-11 as build
20-
21-
ENV SEATUNNEL_VERSION=2.3.1
22-
ENV SEATUNNEL_HOME=/opt/seatunnel
23-
24-
RUN mkdir -p $SEATUNNEL_HOME
25-
26-
ARG TAR_FILE=apache-seatunnel-incubating-${SEATUNNEL_VERSION}-bin.tar.gz
27-
28-
#COPY $TAR_FILE $SEATUNNEL_HOME/$TAR_FILE
29-
#RUN cd $SEATUNNEL_HOME ; \
30-
# tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME \
31-
32-
# forked from seatunnel k8s quick start
33-
RUN wget https://archive.apache.org/dist/incubator/seatunnel/${SEATUNNEL_VERSION}/$TAR_FILE ; \
34-
tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME
35-
36-
# strange behavior: replace mvnw by mvn on install-plugin.sh, remove useless comment on plugin_config
37-
RUN rm $SEATUNNEL_HOME/config/plugin_config
38-
COPY tools/docker/build/scaleph-seatunnel/plugin_config $SEATUNNEL_HOME/config
39-
40-
RUN rm $SEATUNNEL_HOME/bin/install-plugin.sh
41-
COPY tools/docker/build/scaleph-seatunnel/install-plugin.sh $SEATUNNEL_HOME/bin
42-
43-
RUN cd $SEATUNNEL_HOME ; \
44-
sh -x bin/install-plugin.sh ${SEATUNNEL_VERSION}
45-
4617
# BASE_RELEASE_IMAGE argument must be defined twice
47-
ARG FLINK_VERSION=1.17
18+
ARG FLINK_VERSION=1.15
4819
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
4920
FROM $BASE_RELEASE_IMAGE as release
5021

51-
ENV SEATUNNEL_VERSION=2.3.1
22+
ARG SEATUNNEL_VERSION=2.3.2
5223
ENV SEATUNNEL_HOME=/opt/seatunnel
5324

5425
RUN mkdir -p $SEATUNNEL_HOME
5526

56-
COPY --from=build $SCALEPH_HOME $SCALEPH_HOME/
27+
COPY apache-seatunnel-${SEATUNNEL_VERSION}-bin/* $SCALEPH_HOME/
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
ARG FLINK_VERSION=1.17
18+
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
19+
FROM maven:3.8-eclipse-temurin-11 as build
20+
21+
ARG SEATUNNEL_VERSION=2.3.2
22+
23+
ENV SEATUNNEL_HOME=/opt/seatunnel
24+
25+
RUN mkdir -p $SEATUNNEL_HOME
26+
27+
ARG TAR_FILE=apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
28+
29+
#COPY $TAR_FILE $SEATUNNEL_HOME/$TAR_FILE
30+
#RUN cd $SEATUNNEL_HOME ; \
31+
# tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME \
32+
33+
# forked from seatunnel k8s quick start
34+
RUN wget https://archive.apache.org/dist/seatunnel/${SEATUNNEL_VERSION}/$TAR_FILE ; \
35+
tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME
36+
37+
# strange behavior: replace mvnw by mvn on install-plugin.sh, remove useless comment on plugin_config
38+
RUN rm $SEATUNNEL_HOME/config/plugin_config
39+
COPY tools/docker/build/scaleph-seatunnel/plugin_config $SEATUNNEL_HOME/config
40+
41+
RUN rm $SEATUNNEL_HOME/bin/install-plugin.sh
42+
COPY tools/docker/build/scaleph-seatunnel/install-plugin.sh $SEATUNNEL_HOME/bin
43+
44+
RUN cd $SEATUNNEL_HOME ; \
45+
sh -x bin/install-plugin.sh ${SEATUNNEL_VERSION}
46+
47+
# BASE_RELEASE_IMAGE argument must be defined twice
48+
ARG FLINK_VERSION=1.17
49+
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
50+
FROM $BASE_RELEASE_IMAGE as release
51+
52+
ENV SEATUNNEL_HOME=/opt/seatunnel
53+
54+
RUN mkdir -p $SEATUNNEL_HOME
55+
56+
COPY --from=build $SCALEPH_HOME $SCALEPH_HOME/
Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,2 @@
1-
connector-amazondynamodb
21
connector-assert
3-
connector-cassandra
4-
connector-cdc-mysql
5-
connector-cdc-sqlserver
6-
connector-clickhouse
7-
connector-datahub
8-
connector-dingtalk
9-
connector-doris
10-
connector-elasticsearch
11-
connector-email
12-
connector-file-ftp
13-
connector-file-hadoop
14-
connector-file-local
15-
connector-file-oss
16-
connector-file-oss-jindo
17-
connector-file-s3
18-
connector-file-sftp
19-
connector-google-sheets
20-
connector-hive
21-
connector-http-base
22-
connector-http-feishu
23-
connector-http-gitlab
24-
connector-http-github
25-
connector-http-jira
26-
connector-http-klaviyo
27-
connector-http-lemlist
28-
connector-http-myhours
29-
connector-http-notion
30-
connector-http-onesignal
31-
connector-http-wechat
32-
connector-hudi
33-
connector-iceberg
34-
connector-influxdb
35-
connector-iotdb
36-
connector-jdbc
37-
connector-kafka
38-
connector-kudu
39-
connector-maxcompute
40-
connector-mongodb
41-
connector-neo4j
42-
connector-openmldb
43-
connector-pulsar
44-
connector-rabbitmq
45-
connector-redis
46-
connector-s3-redshift
47-
connector-sentry
48-
connector-slack
49-
connector-socket
50-
connector-starrocks
51-
connector-tablestore
52-
connector-selectdb-cloud
53-
connector-hbase
2+
connector-cassandra

0 commit comments

Comments
 (0)