forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (33 loc) · 1.65 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM quay.io/centos/centos:stream8
ARG PRESTO_VERSION
ARG PRESTO_PKG=presto-server-$PRESTO_VERSION.tar.gz
ARG PRESTO_CLI_JAR=presto-cli-$PRESTO_VERSION-executable.jar
ARG JMX_PROMETHEUS_JAVAAGENT_VERSION=0.20.0
ENV PRESTO_HOME="/opt/presto-server"
COPY $PRESTO_PKG .
COPY $PRESTO_CLI_JAR /opt/presto-cli
RUN dnf install -y java-11-openjdk less procps python3 \
&& ln -s $(which python3) /usr/bin/python \
# Download Presto and move \
&& tar -zxf $PRESTO_PKG \
&& mv ./presto-server-$PRESTO_VERSION $PRESTO_HOME \
&& rm -rf $PRESTO_PKG \
&& rm -rf ./presto-server-$PRESTO_VERSION \
&& chmod +x /opt/presto-cli \
&& ln -s /opt/presto-cli /usr/local/bin/ \
# clean cache jobs
&& mv /etc/yum/protected.d/systemd.conf /etc/yum/protected.d/systemd.conf.bak \
&& dnf clean all \
# mkdir for config
&& mkdir -p $PRESTO_HOME/etc \
&& mkdir -p $PRESTO_HOME/etc/catalog \
&& mkdir -p /var/lib/presto/data \
&& mkdir -p /usr/lib/presto/utils \
&& curl -o /usr/lib/presto/utils/jmx_prometheus_javaagent-$JMX_PROMETHEUS_JAVAAGENT_VERSION.jar https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/$JMX_PROMETHEUS_JAVAAGENT_VERSION/jmx_prometheus_javaagent-$JMX_PROMETHEUS_JAVAAGENT_VERSION.jar \
&& ln -s /usr/lib/presto/utils/jmx_prometheus_javaagent-$JMX_PROMETHEUS_JAVAAGENT_VERSION.jar /usr/lib/presto/utils/jmx_prometheus_javaagent.jar
COPY etc/config.properties.example $PRESTO_HOME/etc/config.properties
COPY etc/jvm.config.example $PRESTO_HOME/etc/jvm.config
COPY etc/node.properties $PRESTO_HOME/etc/node.properties
COPY entrypoint.sh /opt
EXPOSE 8080
ENTRYPOINT ["/opt/entrypoint.sh"]