Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][docker] fix scaleph-seatunnel docker image build error #601

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/docker-seatunnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ on:
seatunnelVersion:
description: 'seatunnel version'
required: true
default: '2.3.1'
default: '2.3.2'
type: choice
options:
- 2.3.2
- 2.3.1
flinkVersion:
description: 'flink version'
required: true
Expand Down Expand Up @@ -63,13 +62,18 @@ jobs:
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install SeaTunnel
run: wget https://archive.apache.org/dist/seatunnel/${{ env.SEATUNNEL_VERSION }}/apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin.tar.gz ; \
tar -zxf apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin.tar.gz ; \
cd apache-seatunnel-${{ env.SEATUNNEL_VERSION }}-bin ; \
sh -x bin/install-plugin.sh ${{ env.SEATUNNEL_VERSION }}
- name: Build image
uses: docker/build-push-action@v4
with:
no-cache: false
push: true
context: .
build-args: FLINK_VERSION=${{ env.FLINK_VERSION }}
build-args: FLINK_VERSION=${{ env.FLINK_VERSION }}, SEATUNNEL_VERSION=${{ env.SEATUNNEL_VERSION }}
platforms: linux/amd64,linux/arm64
file: tools/docker/build/scaleph-seatunnel/Dockerfile
tags: ${{ env.HUB }}:${{ env.SEATUNNEL_VERSION }}-flink-${{ env.FLINK_VERSION }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SeaTunnelVersion implements DictInstance {

V_2_3_1("2.3.1", "2.3.1"),
V_2_3_2("2.3.2", "2.3.2"),
;

@JsonCreator
Expand Down
35 changes: 3 additions & 32 deletions tools/docker/build/scaleph-seatunnel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG FLINK_VERSION=1.17
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
FROM maven:3.8-eclipse-temurin-11 as build

ENV SEATUNNEL_VERSION=2.3.1
ENV SEATUNNEL_HOME=/opt/seatunnel

RUN mkdir -p $SEATUNNEL_HOME

ARG TAR_FILE=apache-seatunnel-incubating-${SEATUNNEL_VERSION}-bin.tar.gz

#COPY $TAR_FILE $SEATUNNEL_HOME/$TAR_FILE
#RUN cd $SEATUNNEL_HOME ; \
# tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME \

# forked from seatunnel k8s quick start
RUN wget https://archive.apache.org/dist/incubator/seatunnel/${SEATUNNEL_VERSION}/$TAR_FILE ; \
tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME

# strange behavior: replace mvnw by mvn on install-plugin.sh, remove useless comment on plugin_config
RUN rm $SEATUNNEL_HOME/config/plugin_config
COPY tools/docker/build/scaleph-seatunnel/plugin_config $SEATUNNEL_HOME/config

RUN rm $SEATUNNEL_HOME/bin/install-plugin.sh
COPY tools/docker/build/scaleph-seatunnel/install-plugin.sh $SEATUNNEL_HOME/bin

RUN cd $SEATUNNEL_HOME ; \
sh -x bin/install-plugin.sh ${SEATUNNEL_VERSION}

# BASE_RELEASE_IMAGE argument must be defined twice
ARG FLINK_VERSION=1.17
ARG FLINK_VERSION=1.15
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
FROM $BASE_RELEASE_IMAGE as release

ENV SEATUNNEL_VERSION=2.3.1
ARG SEATUNNEL_VERSION=2.3.2
ENV SEATUNNEL_HOME=/opt/seatunnel

RUN mkdir -p $SEATUNNEL_HOME

COPY --from=build $SCALEPH_HOME $SCALEPH_HOME/
COPY apache-seatunnel-${SEATUNNEL_VERSION}-bin/* $SCALEPH_HOME/
56 changes: 56 additions & 0 deletions tools/docker/build/scaleph-seatunnel/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG FLINK_VERSION=1.17
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
FROM maven:3.8-eclipse-temurin-11 as build

ARG SEATUNNEL_VERSION=2.3.2

ENV SEATUNNEL_HOME=/opt/seatunnel

RUN mkdir -p $SEATUNNEL_HOME

ARG TAR_FILE=apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz

#COPY $TAR_FILE $SEATUNNEL_HOME/$TAR_FILE
#RUN cd $SEATUNNEL_HOME ; \
# tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME \

# forked from seatunnel k8s quick start
RUN wget https://archive.apache.org/dist/seatunnel/${SEATUNNEL_VERSION}/$TAR_FILE ; \
tar -zxf $TAR_FILE --strip 1 -C $SEATUNNEL_HOME

# strange behavior: replace mvnw by mvn on install-plugin.sh, remove useless comment on plugin_config
RUN rm $SEATUNNEL_HOME/config/plugin_config
COPY tools/docker/build/scaleph-seatunnel/plugin_config $SEATUNNEL_HOME/config

RUN rm $SEATUNNEL_HOME/bin/install-plugin.sh
COPY tools/docker/build/scaleph-seatunnel/install-plugin.sh $SEATUNNEL_HOME/bin

RUN cd $SEATUNNEL_HOME ; \
sh -x bin/install-plugin.sh ${SEATUNNEL_VERSION}

# BASE_RELEASE_IMAGE argument must be defined twice
ARG FLINK_VERSION=1.17
ARG BASE_RELEASE_IMAGE=flink:${FLINK_VERSION}
FROM $BASE_RELEASE_IMAGE as release

ENV SEATUNNEL_HOME=/opt/seatunnel

RUN mkdir -p $SEATUNNEL_HOME

COPY --from=build $SCALEPH_HOME $SCALEPH_HOME/
53 changes: 1 addition & 52 deletions tools/docker/build/scaleph-seatunnel/plugin_config
Original file line number Diff line number Diff line change
@@ -1,53 +1,2 @@
connector-amazondynamodb
connector-assert
connector-cassandra
connector-cdc-mysql
connector-cdc-sqlserver
connector-clickhouse
connector-datahub
connector-dingtalk
connector-doris
connector-elasticsearch
connector-email
connector-file-ftp
connector-file-hadoop
connector-file-local
connector-file-oss
connector-file-oss-jindo
connector-file-s3
connector-file-sftp
connector-google-sheets
connector-hive
connector-http-base
connector-http-feishu
connector-http-gitlab
connector-http-github
connector-http-jira
connector-http-klaviyo
connector-http-lemlist
connector-http-myhours
connector-http-notion
connector-http-onesignal
connector-http-wechat
connector-hudi
connector-iceberg
connector-influxdb
connector-iotdb
connector-jdbc
connector-kafka
connector-kudu
connector-maxcompute
connector-mongodb
connector-neo4j
connector-openmldb
connector-pulsar
connector-rabbitmq
connector-redis
connector-s3-redshift
connector-sentry
connector-slack
connector-socket
connector-starrocks
connector-tablestore
connector-selectdb-cloud
connector-hbase
connector-cassandra