Skip to content

Commit

Permalink
lecture05 Build own hive metastore docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Svane20 committed Aug 27, 2024
1 parent 608c09a commit 5a6ffb5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions services/hive-metastore/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use an official openjdk runtime as a parent image
FROM openjdk:8-jdk

# Set environment variables
ENV HIVE_VERSION=3.1.2
ENV JAVA_HOME=/usr/local/openjdk-8
ENV HIVE_HOME=/opt/hive-${HIVE_VERSION}

# Install dependencies
RUN apt-get update && apt-get install -y wget tar procps

# Download and install Hive
RUN wget https://downloads.apache.org/hive/hive-${HIVE_VERSION}/apache-hive-${HIVE_VERSION}-bin.tar.gz && \
tar -xzvf apache-hive-${HIVE_VERSION}-bin.tar.gz -C /opt && \
mv /opt/apache-hive-${HIVE_VERSION}-bin /opt/hive-${HIVE_VERSION} && \
rm apache-hive-${HIVE_VERSION}-bin.tar.gz

# Set up Hive environment variables
ENV PATH=$PATH:${HIVE_HOME}/bin

# Expose the Thrift port
EXPOSE 9083

# Entry point for starting the Hive Metastore
ENTRYPOINT ["hive", "metastore"]
CMD ["-p", "9083"]

0 comments on commit 5a6ffb5

Please sign in to comment.