Skip to main content
Version: 2.3.3

docker


Set Up with Docker

This section provides a quick guide to using SeaTunnel with Docker.

Prerequisites​

We assume that you have a local installations of the following:

Installation​

SeaTunnel docker image​

Step 1:​

To run the image with SeaTunnel, first compress your local seatuune into a compressed package:

sh apache-seatunnel-2.3.3/bin/install-plugin.sh
tar -czvf apache-seatunnel-2.3.3-bin.tar.gz apache-seatunnel-2.3.3

Step 2:​

Create a Dockerfile:

FROM openjdk:8

ENV SEATUNNEL_VERSION="2.3.3"
COPY /apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz /opt/apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
WORKDIR /opt
RUN tar -xzvf apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
RUN mv apache-seatunnel-${SEATUNNEL_VERSION} seatunnel
RUN rm -f /opt/apache-seatunnel-${SEATUNNEL_VERSION}-bin.tar.gz
WORKDIR /opt/seatunnel
ENTRYPOINT ["sh","-c"," bin/seatunnel.sh --config $config -e local"]

Step 3:​

Then run the following commands to build the image:

docker build -t seatunnel:2.3.3 -f Dockerfile .

Step 4:​

You can start the container using the following command:

docker run   -e config="/container/path" -v /host/path:/container/path -d seatunnel:2.3.3

For example

docker run   -e config="/data/seatunnel.streaming.conf" -v /data/apache-seatunnel-2.3.3/config/v2.streaming.conf.template:/data/seatunnel.streaming.conf  -d  seatunnel:test

Step 5:​

Finally, you can use the following command to view the logs

docker logs CONTAINER ID