Skip to content

Commit

Permalink
[Feature] add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Oct 17, 2023
1 parent b2f70fd commit d7cb08c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
41 changes: 39 additions & 2 deletions docs/en/start-v2/docker/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,42 @@ sidebar_position: 3

# Set Up with Docker

<!-- TODO -->
-->
### Download basic image
```shell
docker pull seatunnel-light:version
```

### Install the connector your needed
there has multiple ways to install the connector jar.
1. rebuild customized image with the basic image

```Dockerfile
FROM seatunnel-light:version
# change the connector name and version
RUN wget https://repo1.maven.org/maven2/org/apache/seatunnel/<CONNECTOR_NAME>/<VERSION>/<CONNECTOR_NAME>-<VERSION>.jar -P /opt/seatunnel/connectors/seatunel && \
wget https://repo1.maven.org/maven2/org/apache/seatunnel/<CONNECTOR_NAME>/<VERSION>/<CONNECTOR_NAME>-<VERSION>.jar -P /opt/seatunnel/connectors/seatunel
...
```
2. Mount the lib locally
you can download the lib from maven to local manually, and mount this folder to container.
```shell
docker run -v <YOUR_LOCAL_JAR_PATH>:/opt/seatunnel/connectors/seatunel \
...
seatunnel-basic-image:version
```

### Start The job
```shell
## batch process
docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local --config config/v2.batch.config.template
# start streaming process
docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local --config config/v2.streaming.conf.template
```




15 changes: 15 additions & 0 deletions seatunnel-dist/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM openjdk:8

RUN apt update ; \
apt install -y wget ;

ARG VERSION=2.3.3

RUN wget "https://archive.apache.org/dist/seatunnel/$VERSION/apache-seatunnel-$VERSION-bin.tar.gz" -P /opt && \
cd /opt && \
tar -zxvf apache-seatunnel-$VERSION-bin.tar.gz && \
mv apache-seatunnel-$VERSION seatunnel && \
rm apache-seatunnel-$VERSION-bin.tar.gz && \
wget "https://repo.maven.apache.org/maven2/org/apache/seatunnel/seatunnel-hadoop3-3.1.4-uber/$VERSION/seatunnel-hadoop3-3.1.4-uber-$VERSION-optional.jar" -P /opt/seatunnel/lib

WORKDIR /opt/seatunnel

0 comments on commit d7cb08c

Please sign in to comment.