This is an automated email from the ASF dual-hosted git repository.
nicknezis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new b7f6f3c Add back legacy CentOS 7 with newer gcc and Python (#3772)
b7f6f3c is described below
commit b7f6f3c51b47a06434ee551b22cacd4cda66151d
Author: choi se <[email protected]>
AuthorDate: Sun Mar 6 03:22:35 2022 +0900
Add back legacy CentOS 7 with newer gcc and Python (#3772)
---
.../Dockerfile.centos7} | 33 ++++++++++++++++------
...erfile.dist.centos8 => Dockerfile.dist.centos7} | 12 +++++---
.../{Dockerfile.centos8 => Dockerfile.centos7} | 19 +++++++++----
3 files changed, 45 insertions(+), 19 deletions(-)
diff --git a/docker/test/Dockerfile.centos8 b/docker/compile/Dockerfile.centos7
similarity index 54%
copy from docker/test/Dockerfile.centos8
copy to docker/compile/Dockerfile.centos7
index 6c68648..0014e32 100644
--- a/docker/test/Dockerfile.centos8
+++ b/docker/compile/Dockerfile.centos7
@@ -15,42 +15,57 @@
# specific language governing permissions and limitations
# under the License.
-FROM centos:centos8
+FROM centos:centos7
# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM linux
+ENV LC_ALL en_US.utf8
-RUN yum -y upgrade
+RUN yum -y upgrade && yum -y install centos-release-scl-rh
RUN yum -y install \
+ ant \
automake \
curl \
cmake \
openssl-devel \
file \
- gcc \
- gcc-c++ \
+ devtoolset-8-gcc \
+ devtoolset-8-gcc-c++ \
git \
kernel-devel \
libtool \
make \
patch \
- python39-devel \
+ rh-python38-python \
+ rh-python38-python-devel \
zip \
unzip \
wget \
which \
tree \
+ java-11-openjdk \
java-11-openjdk-devel
-RUN update-alternatives --set python /usr/bin/python3.9
-
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
ENV bazelVersion 4.2.2
RUN wget -O /tmp/bazel.sh
https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh
\
&& chmod +x /tmp/bazel.sh \
- && /tmp/bazel.sh
+ && /tmp/bazel.sh \
+ && rm -rf /tmp/bazel.sh
+
+ENV PATH /opt/rh/devtoolset-8/root/bin:/opt/rh/rh-python38/root/usr/bin:${PATH}
+ENV LD_LIBRARY_PATH
/opt/rh/devtoolset-8/root/lib64:/opt/rh/rh-python38/root/usr/lib64:/usr/local/lib:${LD_LIBRARY_PATH}
+ENV MANPATH
/opt/rh/devtoolset-8/root/usr/share/man:/opt/rh/rh-python38/root/usr/share/man
+ENV PKG_CONFIG_PATH
/opt/rh/rh-python38/root/usr/lib64/pkgconfig:${PKG_CONFIG_PATH}
+
+RUN /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3
\
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3
/usr/bin/python \
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3.8
/usr/bin/python3.8 \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++ \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/cpp /usr/bin/cpp
ADD bazelrc /root/.bazelrc
-ADD scripts/test-platform.sh /test-platform.sh
+ADD scripts/compile-platform.sh /compile-platform.sh
diff --git a/docker/dist/Dockerfile.dist.centos8
b/docker/dist/Dockerfile.dist.centos7
similarity index 83%
rename from docker/dist/Dockerfile.dist.centos8
rename to docker/dist/Dockerfile.dist.centos7
index 3532a75..36242c7 100644
--- a/docker/dist/Dockerfile.dist.centos8
+++ b/docker/dist/Dockerfile.dist.centos7
@@ -16,25 +16,29 @@
# under the License.
#syntax=docker/dockerfile:1.2
-FROM centos:centos8
+FROM centos:centos7
+ENV TARGET_PLATFORM linux
ENV LC_ALL en_US.utf8
+RUN yum -y upgrade && yum -y install centos-release-scl-rh
RUN yum -y install epel-release \
&& yum -y install \
curl \
java-11-openjdk-headless \
supervisor \
nmap-ncat \
- python39 \
- python39-setuptools \
+ rh-python38-python \
+ rh-python38-python-devel \
unzip \
which \
&& yum clean all
ENV JAVA_HOME /usr/
-RUN update-alternatives --set python /usr/bin/python3.9
+RUN /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python \
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3
/usr/bin/python3 \
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3.8
/usr/bin/python3.8
# run Heron installer
RUN --mount=type=bind,source=artifacts,target=/tmp/heron
/tmp/heron/heron-install.sh \
diff --git a/docker/test/Dockerfile.centos8 b/docker/test/Dockerfile.centos7
similarity index 68%
rename from docker/test/Dockerfile.centos8
rename to docker/test/Dockerfile.centos7
index 6c68648..5925597 100644
--- a/docker/test/Dockerfile.centos8
+++ b/docker/test/Dockerfile.centos7
@@ -15,26 +15,28 @@
# specific language governing permissions and limitations
# under the License.
-FROM centos:centos8
+FROM centos:centos7
# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM linux
+ENV LC_ALL en_US.utf8
-RUN yum -y upgrade
+RUN yum -y upgrade && yum -y install centos-release-scl-rh
RUN yum -y install \
automake \
curl \
cmake \
openssl-devel \
file \
- gcc \
- gcc-c++ \
+ devtoolset-8-gcc \
+ devtoolset-8-gcc-c++ \
git \
kernel-devel \
libtool \
make \
patch \
- python39-devel \
+ ant \
+ rh-python38-python-devel \
zip \
unzip \
wget \
@@ -42,7 +44,12 @@ RUN yum -y install \
tree \
java-11-openjdk-devel
-RUN update-alternatives --set python /usr/bin/python3.9
+RUN /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3
\
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3
/usr/bin/python \
+ && /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3.8
/usr/bin/python3.8 \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++ \
+ && /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/cpp /usr/bin/cpp
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk