[
https://issues.apache.org/jira/browse/DRILL-6346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541587#comment-16541587
]
ASF GitHub Bot commented on DRILL-6346:
---------------------------------------
arina-ielchiieva 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_r202019289
##########
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:
Please add the following clarifications:
1. Detach: When starting this way (without detach), once you exit the
sqline, container will be also killed. To persist the container use `--detach`:
`docker run -i --detach -t drill/apache-drill:1.14.0 /bin/bash /bin/bash`.
2. Port forwarding: In order to access Drill WebUI you need to open 8047
port: `docker run -i -p 8047:8047 -t drill/apache-drill:1.14.0 /bin/bash`.
To find you ip of your machine, execute: `docker-machine ip default` or
`docker-machine ip drill-machine` depending on your current dicker machine name.
3. Name: Suggest optionally to add name to the container (`--name drill`):
`docker run --name drill -i -p 8047:8047 -t drill/apache-drill:1.14.0
/bin/bash`.
4. Docker machine: On Windows and Mac default docker machine might not have
enough resources.
On my env I had to create new docker machine. Example:
```
# stop default
docker-machine stop default
# add drill-machine
docker-machine create -d virtualbox --virtualbox-cpu-count "2"
--virtualbox-memory "16384" drill-machine
# activate drill-machine
eval $(docker-machine env drill-machine)
# check status
docker-machine active
```
5. Querying custom files: To query custom files (which I believe will be the
major use case), user needs to mount a volume
(https://docs.docker.com/storage/volumes/) and then update file storage plugin
to look at that volume. I did not try that but it's worth mentioning and even
adding a simple manual.
----------------------------------------------------------------
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:
[email protected]
> Create an Official Drill Docker Container
> -----------------------------------------
>
> Key: DRILL-6346
> URL: https://issues.apache.org/jira/browse/DRILL-6346
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Timothy Farkas
> Assignee: Abhishek Girish
> Priority: Major
> Labels: doc-impacting
> Fix For: 1.14.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)