Skip to content

Commit 7365d0c

Browse files
committed
reorder layers to install base apps first
1 parent 855f53f commit 7365d0c

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

docker/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@ ARG JMX_PROMETHEUS_JAVAAGENT_VERSION=0.20.0
77

88
ENV PRESTO_HOME="/opt/presto-server"
99

10-
COPY $PRESTO_PKG .
11-
COPY --chmod=755 $PRESTO_CLI_JAR /opt/presto-cli
12-
1310
RUN --mount=type=cache,target=/var/cache/dnf \
1411
dnf install -y java-11-openjdk less procps python3 \
1512
&& ln -s $(which python3) /usr/bin/python \
13+
# clean cache jobs
14+
&& mv /etc/yum/protected.d/systemd.conf /etc/yum/protected.d/systemd.conf.bak
15+
16+
COPY $PRESTO_PKG .
17+
COPY --chmod=755 $PRESTO_CLI_JAR /opt/presto-cli
18+
19+
RUN \
1620
# Download Presto and move \
17-
&& tar -zxf $PRESTO_PKG \
21+
tar -zxf $PRESTO_PKG \
1822
&& mv ./presto-server-$PRESTO_VERSION $PRESTO_HOME \
1923
&& rm -rf $PRESTO_PKG \
2024
&& rm -rf ./presto-server-$PRESTO_VERSION \
2125
&& ln -s /opt/presto-cli /usr/local/bin/ \
22-
# clean cache jobs
23-
&& mv /etc/yum/protected.d/systemd.conf /etc/yum/protected.d/systemd.conf.bak \
2426
# mkdir for config
2527
&& mkdir -p $PRESTO_HOME/etc/catalog \
2628
&& mkdir -p /var/lib/presto/data \

0 commit comments

Comments
 (0)