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/15 13:07:45 UTC

[drill-site] branch master updated: Update running-on-docker docs to explain install dir and mounts more clearly.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new c60b817  Update running-on-docker docs to explain install dir and mounts more clearly.
c60b817 is described below

commit c60b81746fd6a39569a62ca0ffeca9809e7f6946
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Wed Sep 15 15:07:06 2021 +0200

    Update running-on-docker docs to explain install dir and mounts more clearly.
---
 .../011-running-drill-on-docker.md                 | 31 ++++++++++++++++++----
 .../sql-reference/sql-commands/084-limit-clause.md |  2 +-
 .../sql-commands/085-offset-clause.md              |  2 +-
 3 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/_docs/en/install/installing-drill-in-embedded-mode/011-running-drill-on-docker.md b/_docs/en/install/installing-drill-in-embedded-mode/011-running-drill-on-docker.md
index ef2bc72..fd8e572 100644
--- a/_docs/en/install/installing-drill-in-embedded-mode/011-running-drill-on-docker.md
+++ b/_docs/en/install/installing-drill-in-embedded-mode/011-running-drill-on-docker.md
@@ -6,15 +6,15 @@ parent: "Installing Drill in Embedded Mode"
 
 **Introduced in release:** 1.14
 
-You can run Drill in a [Docker container](https://www.docker.com/what-container#/package_software).  Running Drill in a container gives a simple way to start using Drill; all you need is Docker installed on your machine. You simply run a Docker command, and your installation will download the Drill Docker image from the [apache/drill](https://hub.docker.com/r/apache/drill) repository on [Docker Hub](https://docs.docker.com/docker-hub/) and bring up a container with Apache Drill running i [...]
+You can run Drill in a [Docker container](https://www.docker.com/what-container#/package_software).  Running Drill in a container gives a simple way to start using Drill; all you need is Docker installed on your machine.  You simply run a Docker command, and your installation will download the Drill Docker image from the [apache/drill](https://hub.docker.com/r/apache/drill) repository on [Docker Hub](https://docs.docker.com/docker-hub/) and bring up a container with Apache Drill running  [...]
 
-Currently, you can only run Drill in embedded mode in a Docker container. Embedded mode is when a single instance of Drill runs on a node or in a container. You do not have to perform any configuration tasks to start using Drill to query local files in embedded mode.  
+Currently, you can only run Drill in embedded mode in a Docker container. Embedded mode is when a single instance of Drill runs on a node or in a container. You do not have to perform any configuration tasks to start using Drill to query local files in embedded mode.
 
 ## Prerequisites
 
-You must have Docker version 18 or later [installed on your machine](https://docs.docker.com/install/).  
+You must have Docker version 18 or later [installed on your machine](https://docs.docker.com/install/).
 
-## Running Drill in a Docker Container  
+## Running Drill in a Docker Container
 
 You can start and run a Docker container in detached mode or foreground mode. [Detached mode]({{site.baseurl}}/docs/running-drill-on-docker/#running-the-drill-docker-container-in-detached-mode) runs the container in the background. Foreground is the default mode. [Foreground mode]({{site.baseurl}}/docs/running-drill-on-docker/#running-the-drill-docker-container-in-foreground-mode) runs the Drill process in the container and attaches the console to Drill’s standard input, output, and stan [...]
 
@@ -32,6 +32,8 @@ Whether you run the Docker container in detached or foreground mode, you start D
 | `bin/bash`               | Connects to the Drill container using a bash shell.                                                                                                                                                                                                                                                             |
 |--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 
+If you decide to work in the filesytem of the Docker image, for example to modify a Drill configuration file, then be aware that Drill has been installed to /opt/drill.  When reading the Drill documentation in the context of the official Docker image, you should substitute the mentioned path for any mentions of the environment variable `$DRILL_HOME`.
+
 ### Running the Drill Docker Container in Foreground Mode  
 
 Open a terminal window (Command Prompt or PowerShell, but not PowerShell ISE) and then issue the following command and options to connect to SQLLine (the Drill shell):   
@@ -92,7 +94,26 @@ SELECT first_name, last_name FROM cp.`employee.json` LIMIT 1;
 1 row selected (0.256 seconds)  
 ```
 
-To query files outside of the container, you can configure [Docker volumes](https://docs.docker.com/storage/volumes/#start-a-service-with-volumes).  
+To query files stored outside of the container, you can [bind mount a directory in from the host](https://docs.docker.com/storage/bind-mounts/)
+```sh
+docker run -i --name drill-1.19.0 \
+	-p 8047:8047 \
+	-t apache/drill:1.19.0
+	-v /mnt/big/data:/mnt
+	/bin/bash
+```
+or you can [create and mount a Docker volume](https://docs.docker.com/storage/volumes/).
+```sh
+docker volume create big-data-vol
+
+docker run -i --name drill-1.19.0 \
+	-p 8047:8047 \
+	-t apache/drill:1.19.0
+	-v big-data-vol:/mnt
+	/bin/bash
+```
+
+See the linked Docker documentation for more details.
 
 ## Drill Web UI  
 
diff --git a/_docs/en/sql-reference/sql-commands/084-limit-clause.md b/_docs/en/sql-reference/sql-commands/084-limit-clause.md
index c45161e..410288c 100644
--- a/_docs/en/sql-reference/sql-commands/084-limit-clause.md
+++ b/_docs/en/sql-reference/sql-commands/084-limit-clause.md
@@ -12,7 +12,7 @@ You can also configure an automatic limit on the number of rows returned from a
 
 ## Syntax
 The LIMIT clause supports the following syntaxes:
-```sql
+```
 LIMIT { count | ALL }
 
 FETCH NEXT count { ROW | ROWS } ONLY
diff --git a/_docs/en/sql-reference/sql-commands/085-offset-clause.md b/_docs/en/sql-reference/sql-commands/085-offset-clause.md
index 355d8b8..c1ea285 100644
--- a/_docs/en/sql-reference/sql-commands/085-offset-clause.md
+++ b/_docs/en/sql-reference/sql-commands/085-offset-clause.md
@@ -7,7 +7,7 @@ The OFFSET clause provides a way to skip a specified number of first rows in a r
 
 ## Syntax
 The OFFSET clause supports the following syntax:
-```sql
+```
 OFFSET start { ROW | ROWS }
 ```
 ## Parameters