Skip to content

Commit e08bc61

Browse files
authored
infra: use apache/hive:4.0.0 as hive Dockerfile base image (#1823)
## What changes are included in this PR? We had some failures in the Pyiceberg repo with the hive docker file here: apache/iceberg-python#2697, so I'm porting this over here. The HMS test Dockerfile was using a deprecated `openjdk:8-jre-slim` base image that has very **recently** been removed from Docker Hub, causing build failures: ``` #7 ERROR: docker.io/library/openjdk:8-jre-slim: not found ``` Simplified the Dockerfile to use apache/hive:3.1.3 as the base image directly, also eliminating the multi-stage build pattern. Which removes the dependency on a deprecated OpenJDK image and will use what's included in hive, and maintains the same functionality for HMS integration tests. Inspired by [](https://github.com/trinodb/docker-images/blob/master/testing/hive4.0-hive/Dockerfile)<https://github.com/trinodb/docker-images/blob/master/testing/hive4.0-hive/Dockerfile>
1 parent 835f528 commit e08bc61

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

crates/catalog/hms/testdata/hms_catalog/Dockerfile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,18 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
FROM --platform=$BUILDPLATFORM openjdk:8-jre-slim AS build
17-
18-
ARG BUILDPLATFORM
19-
20-
RUN apt-get update -qq && apt-get -qq -y install curl
16+
FROM apache/hive:3.1.3
2117

2218
ENV AWSSDK_VERSION=2.20.18
2319
ENV HADOOP_VERSION=3.1.0
2420

25-
RUN curl https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.11.271/aws-java-sdk-bundle-1.11.271.jar -Lo /tmp/aws-java-sdk-bundle-1.11.271.jar
26-
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
21+
USER root
2722

23+
RUN apt-get update -qq && apt-get -qq -y install curl && \
24+
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 && \
25+
curl https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.11.271/aws-java-sdk-bundle-1.11.271.jar -Lo /opt/hive/lib/aws-java-sdk-bundle-1.11.271.jar && \
26+
apt-get clean && rm -rf /var/lib/apt/lists/*
2827

29-
FROM apache/hive:3.1.3
30-
31-
ENV AWSSDK_VERSION=2.20.18
32-
ENV HADOOP_VERSION=3.1.0
28+
COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml
3329

34-
COPY --from=build /tmp/hadoop-aws-${HADOOP_VERSION}.jar /opt/hive/lib/hadoop-aws-${HADOOP_VERSION}.jar
35-
COPY --from=build /tmp/aws-java-sdk-bundle-1.11.271.jar /opt/hive/lib/aws-java-sdk-bundle-1.11.271.jar
36-
COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml
30+
USER hive

0 commit comments

Comments
 (0)