From f859961916b9832f4118b8b0dd57facf9fbe03a0 Mon Sep 17 00:00:00 2001 From: Timothy Regan Date: Wed, 8 Jun 2022 13:02:01 -0400 Subject: [PATCH] update images for unprivileged access --- images/metastore/Dockerfile | 13 ++++++++++++- images/presto/Dockerfile | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/images/metastore/Dockerfile b/images/metastore/Dockerfile index e8b7f37..089c938 100644 --- a/images/metastore/Dockerfile +++ b/images/metastore/Dockerfile @@ -42,4 +42,15 @@ RUN wget -q $jmx_exporter_bin -O jmx_exporter.jar RUN curl -L \ -o /usr/local/share/ca-certificates/rds-ca-2019-root.crt \ https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem \ - && update-ca-certificates \ No newline at end of file + && update-ca-certificates \ + && rm /etc/ssl/cert.pem \ + && ln -s /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem + +RUN chgrp -R 0 ${METASTORE_HOME} && \ + chmod -R g+rwX ${METASTORE_HOME} + +RUN chgrp -R 0 ${HADOOP_HOME} && \ + chmod -R g+rwX ${HADOOP_HOME} + +RUN chgrp -R 0 /etc/ssl/certs && \ + chmod -R g+rwX /etc/ssl/certs \ No newline at end of file diff --git a/images/presto/Dockerfile b/images/presto/Dockerfile index 4cafd3f..2b50b73 100644 --- a/images/presto/Dockerfile +++ b/images/presto/Dockerfile @@ -54,6 +54,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && cd /usr/local/bin \ && rm -rf idle pydoc python python-config +RUN chgrp -R 0 ${PRESTO_HOME} && \ + chmod -R g+rwX ${PRESTO_HOME} + USER $PRESTO_USER CMD ["launcher", "run"]