From 2aed83795ea9af319682c274f32229b07e17993c Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Mon, 3 Nov 2025 20:30:27 -0800 Subject: [PATCH 1/2] use apache/hive:4.0.0 as base image --- dev/hive/Dockerfile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/dev/hive/Dockerfile b/dev/hive/Dockerfile index 2ff3dbce67..578e8383d6 100644 --- a/dev/hive/Dockerfile +++ b/dev/hive/Dockerfile @@ -13,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8-jre-slim AS build - -RUN apt-get update -qq && apt-get -qq -y install curl +FROM apache/hive:4.0.0 ENV HADOOP_VERSION=3.3.6 ENV AWS_SDK_BUNDLE=1.12.753 -RUN curl https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/${HADOOP_VERSION}/hadoop-aws-${HADOOP_VERSION}.jar -Lo /tmp/hadoop-aws-${HADOOP_VERSION}.jar -RUN curl https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/${AWS_SDK_BUNDLE}/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar -Lo /tmp/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar +USER root -FROM apache/hive:4.0.0 +# Install curl, download JARs, and cleanup in a single layer +RUN apt-get update -qq && apt-get -qq -y install curl && \ + curl https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/${HADOOP_VERSION}/hadoop-aws-${HADOOP_VERSION}.jar -Lo /opt/hive/lib/hadoop-aws-${HADOOP_VERSION}.jar && \ + curl https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/${AWS_SDK_BUNDLE}/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar -Lo /opt/hive/lib/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar && \ + apt-get clean && rm -rf /var/lib/apt/lists/* -ENV HADOOP_VERSION=3.3.6 -ENV AWS_SDK_BUNDLE=1.12.753 - -COPY --from=build /tmp/hadoop-aws-${HADOOP_VERSION}.jar /opt/hive/lib/hadoop-aws-${HADOOP_VERSION}.jar -COPY --from=build /tmp/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar /opt/hive/lib/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml + +USER hive \ No newline at end of file From ffa2ba303f0b87d5846b59f196f48a8bb4956429 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Mon, 3 Nov 2025 20:32:23 -0800 Subject: [PATCH 2/2] newline --- dev/hive/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/hive/Dockerfile b/dev/hive/Dockerfile index 578e8383d6..2c87b69ee1 100644 --- a/dev/hive/Dockerfile +++ b/dev/hive/Dockerfile @@ -28,4 +28,4 @@ RUN apt-get update -qq && apt-get -qq -y install curl && \ COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml -USER hive \ No newline at end of file +USER hive