Skip to content

Commit e5059f7

Browse files
authored
[GLUTEN-7480][VL] Build centos-8 docker image for GHA workflow (#7481)
In current GHA workflow, we are using one centos-8 docker image coming from Velox community. That image is no longer updated since centos-8 support is deprecated by the community. The new docker image will be auto periodically updated with a few dependencies including arrow libs pre-installed. With this one used, the workflow will be accelerated (will create a separate pr to use it).
1 parent f46f86d commit e5059f7

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM centos:8
2+
3+
RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* || true
4+
RUN sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* || true
5+
6+
RUN yum update -y && yum install -y epel-release sudo dnf
7+
8+
RUN dnf install -y --setopt=install_weak_deps=False gcc-toolset-9
9+
RUN source /opt/rh/gcc-toolset-9/enable || exit 1
10+
11+
RUN echo "check_certificate = off" >> ~/.wgetrc
12+
13+
RUN yum install -y java-1.8.0-openjdk-devel patch wget git perl
14+
RUN export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk && export PATH=$JAVA_HOME/bin:$PATH
15+
RUN wget --no-check-certificate https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz && \
16+
tar -xvf apache-maven-3.8.8-bin.tar.gz && \
17+
mv apache-maven-3.8.8 /usr/lib/maven && \
18+
export MAVEN_HOME=/usr/lib/maven && \
19+
export PATH=${PATH}:${MAVEN_HOME}/bin
20+
21+
RUN git clone --depth=1 https://github.com/apache/incubator-gluten /opt/gluten
22+
23+
RUN cd /opt/gluten && ./dev/builddeps-veloxbe.sh --run_setup_script=ON build_arrow && rm -rf /opt/gluten

.github/workflows/docker_image.yml

+25-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
- cron: '0 20 * * 0'
2626

2727
jobs:
28-
build:
28+
build-vcpkg-centos-7:
2929
runs-on: ubuntu-latest
3030

3131
steps:
@@ -48,3 +48,27 @@ jobs:
4848
file: dev/vcpkg/docker/Dockerfile.gha
4949
push: true
5050
tags: apache/gluten:vcpkg-centos-7
51+
52+
build-centos-8:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
59+
- name: Set up Docker Buildx
60+
uses: docker/setup-buildx-action@v1
61+
62+
- name: Login to Docker Hub
63+
uses: docker/login-action@v2
64+
with:
65+
username: ${{ secrets.DOCKERHUB_USER }}
66+
password: ${{ secrets.DOCKERHUB_TOKEN }}
67+
68+
- name: Build and push Docker image
69+
uses: docker/build-push-action@v2
70+
with:
71+
context: .
72+
file: .github/workflows/docker/Dockerfile.gha
73+
push: true
74+
tags: apache/gluten:centos-8

0 commit comments

Comments
 (0)