This is an automated email from the ASF dual-hosted git repository.
cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 38d0c1d DRILL-8053: Reduce Docker image size (#2385)
38d0c1d is described below
commit 38d0c1d9586b7adc8adfb89f574085cdc26595fe
Author: Volodymyr Vysotskyi <[email protected]>
AuthorDate: Wed Nov 24 03:07:40 2021 +0200
DRILL-8053: Reduce Docker image size (#2385)
---
Dockerfile | 4 ++--
contrib/storage-splunk/pom.xml | 6 ++++++
distribution/src/assemble/component.xml | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
old mode 100755
new mode 100644
index ac49588..996fb4f
--- a/Dockerfile
+++ b/Dockerfile
@@ -60,14 +60,14 @@ ENV DRILL_HOME=/opt/drill DRILL_USER=drilluser
RUN mkdir $DRILL_HOME
-COPY --from=build /opt/drill $DRILL_HOME
-
RUN groupadd -g 999 $DRILL_USER \
&& useradd -r -u 999 -g $DRILL_USER $DRILL_USER -m -d /var/lib/drill \
&& chown -R $DRILL_USER: $DRILL_HOME
USER $DRILL_USER
+COPY --from=build --chown=$DRILL_USER /opt/drill $DRILL_HOME
+
# Starts Drill in embedded mode and connects to Sqlline
ENTRYPOINT $DRILL_HOME/bin/drill-embedded
diff --git a/contrib/storage-splunk/pom.xml b/contrib/storage-splunk/pom.xml
index f6a2b33..da1d02a 100644
--- a/contrib/storage-splunk/pom.xml
+++ b/contrib/storage-splunk/pom.xml
@@ -43,6 +43,12 @@
<groupId>com.splunk</groupId>
<artifactId>splunk</artifactId>
<version>1.7.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Test dependencies -->
<dependency>
diff --git a/distribution/src/assemble/component.xml
b/distribution/src/assemble/component.xml
index f6dd11d..ebe8b71 100644
--- a/distribution/src/assemble/component.xml
+++ b/distribution/src/assemble/component.xml
@@ -137,6 +137,10 @@
<exclude>org.apache.drill.contrib.storage-hive</exclude>
<exclude>org.apache.drill.memory</exclude>
<exclude>org.apache.drill.metastore</exclude>
+ <exclude>org.projectlombok:lombok</exclude>
+ <exclude>org.junit.jupiter:*:jar</exclude>
+ <exclude>org.junit.platform:*:jar</exclude>
+ <exclude>org.junit.vintage:*:jar</exclude>
<!-- Below Hive jars are already included in
drill-hive-exec-shaded.jar -->
<exclude>junit:junit:jar</exclude>
<!-- exclude or sqlline has problems -->