kszucs commented on a change in pull request #10300:
URL: https://github.com/apache/arrow/pull/10300#discussion_r631042680



##########
File path: dev/tasks/jars/Dockerfile
##########
@@ -0,0 +1,124 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+FROM quay.io/pypa/manylinux2014_x86_64:latest

Review comment:
       I'd suggest to create a child image which depends on the manylinux2014 
image and install the additional packages required for gandiva there. This way 
we wouldn't need to check in and maintain that many scripts.
   
   Something like the following should be enough:
   
   #### ci/scripts/java_bundled_jar.sh
   
   This file could be a customized version of 
`ci/scripts/python_wheel_manylinux_build.sh` or the [build-linux-cpp.sh]( 
https://github.com/apache/arrow/pull/10300/files#diff-eb09a993bfee5b11462aecb3e85df34161bbf5b82a792fceacf545adba5e6b8f)
 without multibuild.
   
   #### ci/docker/java-bundled-jar.dockerfile:
   
   ```dockerfile
   ARG base
   FROM ${base}
   
   RUN vcpkg install --clean-after-build <additional-dependencies>
   
   ARG java=1.8.0
   RUN yum install -y xz java-$java-openjdk-devel ccache flex wget && yum clean 
all
   ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk/
   ```
   
   #### docker-compose.yml
   
   ```yml
   x-hierarchy:
     # ...
     python-wheel-manylinux-2014:
       - java-bundled-jar:
   
   services:
     # ...
     java-bundled-jar:
       image: ${REPO}:${ARCH}-java-bundled-jar-vcpkg-${VCPKG}
       build:
         args:
           base: 
${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG}
           java: 1.8.0
         context: .
         dockerfile: ci/docker/java-bundled-jar.dockerfile
         cache_from:
           - ${REPO}:${ARCH}-java-bundled-jar-vcpkg-${VCPKG}
       environment:
         <<: *ccache
       volumes:
         - .:/arrow:delegated
         - 
${DOCKER_VOLUME_PREFIX}python-wheel-manylinux2014-ccache:/ccache:delegated
       command: /arrow/ci/scripts/java_bundled_jar.sh
   ```
   
   Then you can use archery to build and run this docker setup:
   
   ```console
   archery docker build java-bundled-jar  # just builds the images
   archery docker run java-bundled-jar  # builds and executes the image
   ```
   
   How does it sound to you?
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to