You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2021/09/17 08:53:40 UTC

[drill] 06/09: Add hooks/ dir containing hooks for Docker Hub image builder.

This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch 7999-docker-jdk
in repository https://gitbox.apache.org/repos/asf/drill.git

commit aa2215275ce5aba40b2b95dabd10aaeabb9f0fb5
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Thu Sep 16 19:06:27 2021 +0200

    Add hooks/ dir containing hooks for Docker Hub image builder.
    
    See the committed README for more information.
---
 Dockerfile   | 2 +-
 hooks/README | 9 +++++++++
 hooks/build  | 4 ++++
 hooks/push   | 4 ++++
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 6cf8c48..f2966dd 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -22,7 +22,7 @@
 # build arg which you should set when invoking docker build. 
 # Example syntax: docker build --build-arg BASE_IMAGE="openjdk:8-jre"
 
-ARG $BASE_IMAGE=openjdk:11-jre
+ARG $BASE_IMAGE=openjdk:8-jre
 
 # Uses intermediate image for building Drill to reduce target image size
 # Build using OpenJDK 8 to maintain compatibility with all OpenJDK >= 8
diff --git a/hooks/README b/hooks/README
new file mode 100644
index 0000000..53f7b03
--- /dev/null
+++ b/hooks/README
@@ -0,0 +1,9 @@
+This directory exists for Docker Hub's automatic image building. The hooks 
+here override the default build, test and push commands used by Docker Hub
+to build the published Docker images of Drill.  The reason they are overridden
+is so that we can produce Docker images based on multiple OpenJDK base images,
+all using a single Dockerfile.  Also see
+
+../Dockerfile
+https://docs.docker.com/docker-hub/builds/advanced/
+
diff --git a/hooks/build b/hooks/build
new file mode 100755
index 0000000..6e08a9d
--- /dev/null
+++ b/hooks/build
@@ -0,0 +1,4 @@
+docker build --build-arg BASE_IMAGE=openjdk:8-jre -t apache/drill:latest .
+docker build --build-arg BASE_IMAGE=openjdk:11-jre -t apache/drill:openjdk11 .
+docker build --build-arg BASE_IMAGE=openjdk:17 -t apache/drill:openjdk17 .
+
diff --git a/hooks/push b/hooks/push
new file mode 100755
index 0000000..31b32e3
--- /dev/null
+++ b/hooks/push
@@ -0,0 +1,4 @@
+docker push apache/drill:latest
+docker push apache/drill:openjdk11
+docker push apache/drill:openjdk17
+