This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 03ff0eec1cd66be11fd18b13bd669235f0b869ea
Author: Till Rohrmann <[email protected]>
AuthorDate: Thu Dec 3 17:47:44 2020 +0100

    [FLINK-20355][docs] Move how to create Python Docker image to 
standalone/docker.md
---
 .../resource-providers/standalone/docker.md         | 21 +++++++++++++++++++++
 .../resource-providers/standalone/docker.zh.md      | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/docs/deployment/resource-providers/standalone/docker.md 
b/docs/deployment/resource-providers/standalone/docker.md
index 30e9512..5c17c4a 100644
--- a/docs/deployment/resource-providers/standalone/docker.md
+++ b/docs/deployment/resource-providers/standalone/docker.md
@@ -352,6 +352,27 @@ as described in [how to run the Flink 
image](#how-to-run-flink-image).
     # e.g. to distribute the custom image to your cluster
     docker push custom_flink_image
     ```
+  
+### Enabling Python
+
+To build a custom image which has Python and Pyflink prepared, you can refer 
to the following Dockerfile:
+{% highlight Dockerfile %}
+FROM flink
+
+# install python3 and pip3
+RUN apt-get update -y && \
+apt-get install -y python3.7 python3-pip python3.7-dev && rm -rf 
/var/lib/apt/lists/*
+RUN ln -s /usr/bin/python3 /usr/bin/python
+
+# install Python Flink
+RUN pip3 install apache-flink
+{% endhighlight %}
+
+Build the image named as **pyflink:latest**:
+
+{% highlight bash %}
+sudo docker build -t pyflink:latest .
+{% endhighlight %}
 
 {% top %}
 
diff --git a/docs/deployment/resource-providers/standalone/docker.zh.md 
b/docs/deployment/resource-providers/standalone/docker.zh.md
index c1e2b71..681eb9c 100644
--- a/docs/deployment/resource-providers/standalone/docker.zh.md
+++ b/docs/deployment/resource-providers/standalone/docker.zh.md
@@ -491,6 +491,27 @@ services:
         parallelism.default: 2
 ```
 
+### Enabling Python
+
+To build a custom image which has Python and Pyflink prepared, you can refer 
to the following Dockerfile:
+{% highlight Dockerfile %}
+FROM flink
+
+# install python3 and pip3
+RUN apt-get update -y && \
+apt-get install -y python3.7 python3-pip python3.7-dev && rm -rf 
/var/lib/apt/lists/*
+RUN ln -s /usr/bin/python3 /usr/bin/python
+
+# install Python Flink
+RUN pip3 install apache-flink
+{% endhighlight %}
+
+Build the image named as **pyflink:latest**:
+
+{% highlight bash %}
+sudo docker build -t pyflink:latest .
+{% endhighlight %}
+
 {% top %}
 
 ## Flink with Docker Swarm

Reply via email to