Artem
10/04/2023, 7:26 PMFROM flink:1.17.1
# Install JDK and essential libraries
RUN apt-get update -y && \
apt-get install -y openjdk-11-jdk build-essential libssl-dev zlib1g-dev libbz2-dev libffi-dev lzma liblzma-dev bash
# Install Python 3.10.13
RUN set -ex; \
wget <https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz> && \
tar -xvf Python-3.10.13.tgz && \
cd Python-3.10.13 && \
./configure --without-tests --enable-shared && \
make -j6 && \
make install && \
ldconfig /usr/local/lib && \
cd .. && rm -f Python-3.10.13.tgz && rm -rf Python-3.10.13 && \
ln -s /usr/local/bin/python3 /usr/local/bin/python
RUN pip3 install --upgrade pip
# Install Apache Flink
COPY apache-flink*.tar.gz /
RUN pip3 install --no-cache-dir /apache-flink-libraries*.tar.gz -v
RUN pip3 install --no-cache-dir /apache-flink*.tar.gz -v
# Download connector libraries
RUN wget -P /opt/flink/lib/ <https://repo.maven.apache.org/maven2/org/apache/flink/flink-json/1.17.1/flink-json-1.17.1.jar>; \
wget -P /opt/flink/lib/ <https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/1.17.1/flink-sql-connector-kafka-1.17.1.jar>; \
wget -P /opt/flink/lib/ <https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-elasticsearch7/3.0.1-1.17/flink-sql-connector-elasticsearch7-3.0.1-1.17.jar>;
WORKDIR /opt/flink
The error log is below :
18.98 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: <https://pip.pypa.io/warnings/venv>
19.03 Installing build dependencies: finished with status 'done'
19.03 Getting requirements to build wheel: started
19.03 Running command Getting requirements to build wheel
19.10 Include folder should be at '/opt/java/openjdk/include' but doesn't exist. Please check you've installed the JDK properly.
19.12 error: subprocess-exited-with-error
19.12
19.12 × Getting requirements to build wheel did not run successfully.
19.12 │ exit code: 255
19.12 ╰─> See above for output.
19.12
19.12 note: This error originates from a subprocess, and is likely not a problem with pip.
19.12 full command: /usr/local/bin/python3.10 /usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpwujq3uju
19.12 cwd: /tmp/pip-install-71b1sm0q/pemja_2bee4b6bba71423b9a43f21b71487474
19.12 Getting requirements to build wheel: finished with status 'error'
19.12 error: subprocess-exited-with-error
19.12
19.12 × Getting requirements to build wheel did not run successfully.
19.12 │ exit code: 255
19.12 ╰─> See above for output.
19.12
19.12 note: This error originates from a subprocess, and is likely not a problem with pip.
------
dockerfile:24
--------------------
22 | COPY apache-flink*.tar.gz /
23 | RUN pip3 install --no-cache-dir /apache-flink-libraries*.tar.gz -v
24 | >>> RUN pip3 install --no-cache-dir /apache-flink*.tar.gz -v
25 |
26 | # Download connector libraries
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install --no-cache-dir /apache-flink*.tar.gz -v" did not complete successfully: exit code: 1