Skip to content

Commit 9e16bc2

Browse files
authored
infra: use apache/hive:4.0.0 as hive Dockerfile base image (#2697)
1 parent a9cb58b commit 9e16bc2

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

dev/hive/Dockerfile

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

16-
FROM openjdk:8-jre-slim AS build
17-
18-
RUN apt-get update -qq && apt-get -qq -y install curl
16+
FROM apache/hive:4.0.0
1917

2018
ENV HADOOP_VERSION=3.3.6
2119
ENV AWS_SDK_BUNDLE=1.12.753
2220

23-
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
24-
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
21+
USER root
2522

26-
FROM apache/hive:4.0.0
23+
# Install curl, download JARs, and cleanup in a single layer
24+
RUN apt-get update -qq && apt-get -qq -y install curl && \
25+
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 && \
26+
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 && \
27+
apt-get clean && rm -rf /var/lib/apt/lists/*
2728

28-
ENV HADOOP_VERSION=3.3.6
29-
ENV AWS_SDK_BUNDLE=1.12.753
30-
31-
COPY --from=build /tmp/hadoop-aws-${HADOOP_VERSION}.jar /opt/hive/lib/hadoop-aws-${HADOOP_VERSION}.jar
32-
COPY --from=build /tmp/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar /opt/hive/lib/aws-java-sdk-bundle-${AWS_SDK_BUNDLE}.jar
3329
COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml
30+
31+
USER hive

0 commit comments

Comments
 (0)