Skip to content

Commit 9fd50cd

Browse files
committed
nit
1 parent ffdfbc2 commit 9fd50cd

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

website/docs/quickstart/flink.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@ mkdir fluss-quickstart-flink
3333
cd fluss-quickstart-flink
3434
```
3535

36-
2. Create a Dockerfile named `fluss.Dockerfile` as follows. You can adjust the Flink version as needed. Please make sure to download the compatible versions of [fluss-flink connector jar](/downloads), [flink-connector-faker](https://github.com/knaufk/flink-faker/releases) in the Dockerfile.
36+
2. Create a `lib` directory and download the required jar files. You can adjust the Flink version as needed. Please make sure to download the compatible versions of [fluss-flink connector jar](/downloads) and [flink-connector-faker](https://github.com/knaufk/flink-faker/releases)
3737

38-
```Dockerfile
39-
ARG FLINK_VERSION="1.20"
40-
FROM flink:${FLINK_VERSION}
41-
ARG FLINK_VERSION
42-
RUN wget -P /opt/flink/lib https://github.com/knaufk/flink-faker/releases/download/v0.5.3/flink-faker-0.5.3.jar
43-
RUN wget -P /opt/flink/lib https://repo1.maven.org/maven2/org/apache/fluss/fluss-flink-${FLINK_VERSION}/$FLUSS_DOCKER_VERSION$/fluss-flink-${FLINK_VERSION}-$FLUSS_DOCKER_VERSION$.jar
38+
```shell
39+
export FLINK_VERSION="1.20"
4440
```
4541

46-
3. Create a `docker-compose.yml` file with the following content:
42+
```shell
43+
mkdir lib
44+
wget -O lib/flink-faker-0.5.3.jar https://github.com/knaufk/flink-faker/releases/download/v0.5.3/flink-faker-0.5.3.jar
45+
wget -O lib/fluss-flink-${FLINK_VERSION}-$FLUSS_DOCKER_VERSION$.jar https://repo1.maven.org/maven2/org/apache/fluss/fluss-flink-${FLINK_VERSION}/$FLUSS_DOCKER_VERSION$/fluss-flink-${FLINK_VERSION}-$FLUSS_DOCKER_VERSION$.jar
46+
```
4747

48+
3. Create a `docker-compose.yml` file with the following content:
4849

4950
```yaml
5051
services:
@@ -79,39 +80,42 @@ services:
7980
#end
8081
#begin Flink cluster
8182
jobmanager:
82-
build:
83-
dockerfile: ./fluss.Dockerfile
83+
image: flink:${FLINK_VERSION}
8484
ports:
8585
- "8083:8081"
86-
command: jobmanager
8786
environment:
8887
- |
8988
FLINK_PROPERTIES=
9089
jobmanager.rpc.address: jobmanager
90+
entrypoint: ["sh", "-c", "cp -v /tmp/lib/*.jar /opt/flink/lib && exec /docker-entrypoint.sh jobmanager"]
91+
volumes:
92+
- ./lib:/tmp/lib
9193
taskmanager:
92-
build:
93-
dockerfile: ./fluss.Dockerfile
94+
image: flink:${FLINK_VERSION}
9495
depends_on:
9596
- jobmanager
96-
command: taskmanager
9797
environment:
9898
- |
9999
FLINK_PROPERTIES=
100100
jobmanager.rpc.address: jobmanager
101101
taskmanager.numberOfTaskSlots: 10
102102
taskmanager.memory.process.size: 2048m
103103
taskmanager.memory.framework.off-heap.size: 256m
104+
entrypoint: ["sh", "-c", "cp -v /tmp/lib/*.jar /opt/flink/lib && exec /docker-entrypoint.sh jobmanager"]
105+
volumes:
106+
- ./lib:/tmp/lib
104107
sql-client:
105-
build:
106-
dockerfile: ./fluss.Dockerfile
107-
command: bin/sql-client.sh
108+
image: flink:${FLINK_VERSION}
108109
depends_on:
109110
- jobmanager
110111
environment:
111112
- |
112113
FLINK_PROPERTIES=
113114
jobmanager.rpc.address: jobmanager
114115
rest.address: jobmanager
116+
entrypoint: ["sh", "-c", "cp -v /tmp/lib/*.jar /opt/flink/lib && exec /docker-entrypoint.sh bin/sql-client.sh"]
117+
volumes:
118+
- ./lib:/tmp/lib
115119
#end
116120
```
117121

0 commit comments

Comments
 (0)