Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 6) Continue developing
# 7) `make snapshot' as needed to push snapshot images to dockerhub
#
VERSION := 1-SNAPSHOT
VERSION := 12-SNAPSHOT
RELEASE_TYPE := $(if $(filter %-SNAPSHOT, $(VERSION)),snapshot,release)

LABEL := com.teradata.git.hash=$(shell git rev-parse HEAD)
Expand Down
9 changes: 4 additions & 5 deletions prestodb/hive3.1-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ ARG HADOOP_VERSION=3.1.2
ARG HIVE_VERSION=3.1.2

# TODO Apache Archive is rate limited -- these should probably go in S3
ARG HADOOP_BINARY_PATH=https://archive.apache.org/dist/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz
ARG HIVE_BINARY_PATH=https://apache.mivzakim.net/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz

RUN curl -o /tmp/hadoop.tar.gz --url $HADOOP_BINARY_PATH && \
RUN HADOOP_BINARY_PATH=https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz && \
curl -o /tmp/hadoop.tar.gz --url $HADOOP_BINARY_PATH && \
Comment on lines +29 to +30
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Switching from build ARGs to local RUN variables removes configurability and weakens Docker caching.

Defining HADOOP_BINARY_PATH only inside RUN removes the ability to override it at build time and stops it from contributing to the image’s cache key. To keep configurability and caching while changing the default, consider retaining ARG HADOOP_BINARY_PATH=... and just updating its default value instead of redefining it in the RUN step.

tar xzf /tmp/hadoop.tar.gz --directory /opt && mv /opt/hadoop-$HADOOP_VERSION /opt/hadoop

RUN curl -o /tmp/hive.tar.gz --url $HIVE_BINARY_PATH && \
RUN HIVE_BINARY_PATH=https://archive.apache.org/dist/hive/hive-${HIVE_VERSION}/apache-hive-${HIVE_VERSION}-bin.tar.gz && \
curl -o /tmp/hive.tar.gz --url $HIVE_BINARY_PATH && \
tar xzf /tmp/hive.tar.gz --directory /opt && mv /opt/apache-hive-${HIVE_VERSION}-bin /opt/hive

ARG MYSQL_CONNECTOR_VERSION=8.0.13
Expand Down
2 changes: 1 addition & 1 deletion prestodb/hive4.0-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN yum install -y \
curl -o /tmp/hadoop.tar.gz --url $HADOOP_BINARY_PATH && \
tar xzf /tmp/hadoop.tar.gz --directory /opt && mv /opt/hadoop-${HADOOP_VERSION} /opt/hadoop && \
# install hive
HIVE_BINARY_PATH=https://dlcdn.apache.org/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz && \
HIVE_BINARY_PATH=https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz && \
curl -o /tmp/hive.tar.gz --url $HIVE_BINARY_PATH && \
tar xzf /tmp/hive.tar.gz --directory /opt && mv /opt/apache-hive-${HIVE_VERSION}-bin /opt/hive && \
# install mysql connector and aws s3 sdk
Expand Down