seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Feature] add dockerfile

Open liunaijie opened this issue 1 year ago • 24 comments

Purpose of this pull request

close https://github.com/apache/seatunnel/issues/5475

add dockerfile, added docker, docker-full maven profile. when use docker profile it will build the light docker image (only include fake, console connector) (image name will be apache/seatunnel:<VERSION>) when use docker-full profile it will build the full connector docker image (image name will be apache/seatunnel:<VERSION>-full)

Now it need manually publish docker image to docker hub.

Does this PR introduce any user-facing change?

No

How was this patch tested?

with github action, added a new job, will run docker image and submit a job.

Check list

  • [ ] If any new Jar binary package adding in your PR, please add License Notice according New License Guide
  • [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
  • [ ] If you are contributing the connector code, please check that the following files are updated:
    1. Update change log that in connector document. For more details you can refer to connector-v2
    2. Update plugin-mapping.properties and add new connector information in it
    3. Update the pom file of seatunnel-dist
  • [ ] Update the release-note.

liunaijie avatar Sep 19 '23 13:09 liunaijie

Could you retrigger there failed CI? Thanks.

Hisoka-X avatar Sep 20 '23 02:09 Hisoka-X

Could you retrigger there failed CI? Thanks.

me? I can't trigger the CI in this repo

liunaijie avatar Sep 20 '23 02:09 liunaijie

Our CI runnning on your own fork repository, so you can retirgger it in your repository action. image

Hisoka-X avatar Sep 20 '23 02:09 Hisoka-X

Our CI runnning on your own fork repository, so you can retirgger it in your repository action. image

Done.

liunaijie avatar Sep 20 '23 05:09 liunaijie

@ruanwenjun @Hisoka-X PTAL

liunaijie avatar Sep 20 '23 09:09 liunaijie

This document only for SeaTunnel Zeta and is more appropriately named docker_for_zeta.md

Done

liunaijie avatar Oct 07 '23 06:10 liunaijie

@FlechazoW i update the document add flink/spark engine. PTAL.

liunaijie avatar Oct 09 '23 05:10 liunaijie

You need to enable ci/cd first.

FlechazoW avatar Oct 12 '23 02:10 FlechazoW

Same as https://github.com/apache/seatunnel/pull/5594#issuecomment-1757087541 .

Hisoka-X avatar Oct 13 '23 02:10 Hisoka-X

@Hisoka-X the test result attached,

image image

liunaijie avatar Oct 16 '23 06:10 liunaijie

Hi @liunaijie . Could you follow #5594 to add a test case for docker?

Hisoka-X avatar Nov 03 '23 02:11 Hisoka-X

Hi @liunaijie . Could you follow #5594 to add a test case for docker?

I add a test case on maven verify phase. run a command to verify.

liunaijie avatar Nov 03 '23 05:11 liunaijie

One question: when i pakcage locally, i find the starter jar has version info. like seatunnel-starter-2.3.3-SNAPSHOT.jar not the format seatunnel-starter.jar. so when i submit job, it will get error. I manually change the seatunnel.sh script to pass the test in local. Does anyone know why the finnalName is without version but the jar still has version info.

liunaijie avatar Nov 03 '23 05:11 liunaijie

One question: when i pakcage locally, i find the starter jar has version info. like seatunnel-starter-2.3.3-SNAPSHOT.jar not the format seatunnel-starter.jar. so when i submit job, it will get error. I manually change the seatunnel.sh script to pass the test in local. Does anyone know why the finnalName is without version but the jar still has version info.

In my environment, these are not exist seatunnel-starter-2.3.3-SNAPSHOT.jar but only seatunnel-starter.jar. Where did you get seatunnel-starter-2.3.3-SNAPSHOT.jar jar? image

Hisoka-X avatar Nov 08 '23 08:11 Hisoka-X

One question: when i pakcage locally, i find the starter jar has version info. like seatunnel-starter-2.3.3-SNAPSHOT.jar not the format seatunnel-starter.jar. so when i submit job, it will get error. I manually change the seatunnel.sh script to pass the test in local. Does anyone know why the finnalName is without version but the jar still has version info.

In my environment, these are not exist seatunnel-starter-2.3.3-SNAPSHOT.jar but only seatunnel-starter.jar. Where did you get seatunnel-starter-2.3.3-SNAPSHOT.jar jar? image

package dist module, unzip apache-seatunnel-2.3.3-SNAPSHOT-bin.tar.gz.

liunaijie avatar Nov 08 '23 09:11 liunaijie

image Fine for me too.

Hisoka-X avatar Nov 08 '23 09:11 Hisoka-X

image Fine for me too.

It work well in CI phase https://github.com/liunaijie/seatunnel/actions/runs/6785810765/job/18475827132, maybe i have something change in my local i am not noticed.

liunaijie avatar Nov 08 '23 09:11 liunaijie

image Fine for me too.

It work well in CI phase https://github.com/liunaijie/seatunnel/actions/runs/6785810765/job/18475827132, maybe i have something change in my local i am not noticed.

I re-run clean, install command in version 2.3.4-snapshot. it works for me.

liunaijie avatar Nov 08 '23 09:11 liunaijie

@Hisoka-X @ruanwenjun @EricJoy2048 PTAL when you have time. when we push tag, it will build, verify, push docker image to docker hub. Here is a successful job link for your refer: https://github.com/liunaijie/seatunnel/actions/runs/6811013504/job/18520474386. and docker hub images generate by this job: https://hub.docker.com/r/liunaijie/seatunnel/tags

liunaijie avatar Nov 09 '23 15:11 liunaijie

removed action file, now it won't auto publish image to docker hub. when the release manager want publish image, he can package dist module with docker profile, the image will auto build, need manually publish.

liunaijie avatar Nov 21 '23 23:11 liunaijie

cc @TyrantLucifer

Hisoka-X avatar Nov 22 '23 02:11 Hisoka-X

@TyrantLucifer PTAL

EricJoy2048 avatar Jan 11 '24 11:01 EricJoy2048

@EricJoy2048 @TyrantLucifer Do we need full connector docker image? And I still want add github action to auto deploy docker image to docker hub. For the case @TyrantLucifer mentioned, we will rollback/fix when review process find some bug.

  1. I am not clear about the pre-release process. but i think we can only monitor the tag/branch of finial tag/branch instand of pre-release tag/branch.
  2. or we can delete the error image manually when we find bug

liunaijie avatar Jan 12 '24 09:01 liunaijie

@Hisoka-X @hailin0 can you help take a look about this pr. add Dockerfile, we can build publish docker image to offical docker hub. user won't need build the image byself. and we also can include all lib to image user can skip the install plugin step.

liunaijie avatar May 08 '24 06:05 liunaijie