Agirish commented on a change in pull request #1348: DRILL-6346: Create an 
Official Drill Docker Container
URL: https://github.com/apache/drill/pull/1348#discussion_r202119176
 
 

 ##########
 File path: docs/dev/Docker.md
 ##########
 @@ -0,0 +1,73 @@
+# How to build, publish and run a Apache Drill Docker image
+
+## Prerequisites
+
+To build an Apache Drill docker image, you need to have the following software 
installed on your system to successfully complete a build. 
+  * Java 8
+  * Maven 3.3.1 or greater
+  * Docker 18 or greater
+
+## Checkout
+
+`git clone https://github.com/apache/drill.git`
+    
+## Build Drill
+```
+$ cd drill
+$ mvn clean install
+```   
+## Build Docker Image
+```
+$ cd distribution
+$ mvn dockerfile:build -Pdocker
+```
+
+## Push Docker Image
+   
+   By default, the image built above is configured to be pushed to [Drill 
Docker Hub](https://hub.docker.com/r/drill/apache-drill/) to create official 
Drill Docker images. 
+```   
+$ cd distribution
+$ mvn dockerfile:push -Pdocker
+```    
+  You can configure the repository in pom.xml to point to any private or 
public container registry, or specify it in your mvn command:
+```  
+$ cd distribution
+$ mvn dockerfile:push -Pdocker -Pdocker.repository=<my_repo>
+```
+## Run Docker Container
+   
+   Running the Docker container should start Drill in embedded mode and 
connect to Sqlline
+```    
+$ docker run -i -t drill/apache-drill:1.14.0 /bin/bash
 
 Review comment:
   (1) --detach option is useful. Users will then need to use drill-localhost 
to connect to Sqlline once they connect into the container. Will update the doc.
   (2) I don't think it's necessary. Also, it's preferred to use localhost:8047 
to connect to Web UI if brought up on Mac or PC.  
   (3) Name will be useful - this way we'll not need to provide the container 
ID during Docker exec. Will add this and update the doc. 
   (4) I tried on Docker for Mac - there were no issues. Looking at the doc 
(https://docs.docker.com/machine/overview/#what-is-docker-machine), it's for 
older Mac systems which do not support Docker for Mac (probably similarly for 
PCs). If someone faces an issue, they'll likely face it for any container they 
try to bring up - independent of Drill. So this is more generic Docker 
troubleshooting. I'm thinking, we can just have a link to this instead? 
   (5) Volumes will be helpful - for now, i'll share a link to this in the doc. 
Will try it out and include examples in the doc Bridget will add - as it's a 
more user facing doc (ex: how to query data on your Mac when using Drill Docker 
container)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to