Docker image for Presto Server and Presto CLI.
This repository is integrated with Docker Registry at johandry/presto, any change in the master branch will push a new image to Docker Registry.
To get the image use the Docker pull command:
docker pull johandry/presto:0.167-t.0.3
With a Dockerfile you can use:
FROM johandry/presto:0.167-t.0.3
COPY catalog/Hive.properties /usr/lib/presto/etc/catalog/
ENV HTTP_SERVER_PORT=8080
ENV PRESTO_MAX_MEMORY=50
ENV PRESTO_MAX_MEMORY_PER_NODE=1
ENV PRESTO_JVM_HEAP_SIZE=8
CMD /etc/init.d/presto run
Then you can build and run a Presto Coordinator with:
docker build -t my_presto .
docker run -it --rm --name presto_coordinator -d my_presto /bin/sh --login
To use Presto CLI, first get the image:
docker pull johandry/presto-cli:0.167-t.0.3
It's not common but you may use it in your own image with:
FROM johandry/presto-cli:latest
To use the Presto CLI, run a container with the presto-cli image and send the presto parameters as commands.
docker run --name presto-cli --rm -it johandry/presto-cli --server ${coordinator_ip}:8080 --execute ${query}
Or, use no command parameter to execute the Presto CLI
docker run --name presto-cli --rm -it johandry/presto-cli
presto> show catalogs;
Catalog
-----------
blackhole
jmx
system
tpch
(4 rows)
Query 20170423_051645_00006_ccijx, FINISHED, 1 node
Splits: 1 total, 1 done (100.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]
presto>
To create a Presto cluster you can use Docker Compose or Kubernetes.
To build the new images just execute make.
If you which to release/push the new images to a Docker Registry, modify in the Makefile the variable DOCKER_USER and execute:
make release
Optionally, you can pass the Presto Server version to build or release.
make PRESTO_VERSION=0.167-t.0.3
make release PRESTO_VERSION=0.167-t.0.3
Adding -presto or -cli to the build or release make rules, will build or release the Presto Server or Presto CLI images. For example:
make build-presto
make release-presto
make build-cli
make release-cli
With the make you can also:
make allmake pullmake shmake cleanmake clean-allmake lsmake presto-dashboardmake climake query H=coordinator Q='show catalogs;', make query-catalogs H=coordinator, make query-workers H=coordinatormake helpPresto port:
HTTP_SERVER_PORT=8080
Presto memory settings:
PRESTO_MAX_MEMORY=50
PRESTO_MAX_MEMORY_PER_NODE=1
PRESTO_JVM_HEAP_SIZE=8
Address of the Coordinator (IP address or hostname):
COORDINATOR=coordinator
HIVE metastore parameters, if all of them are set a Hive metastore connector will be created:
HIVE_METASTORE_HOST=hive-hadoop-service
HIVE_METASTORE_PORT=9083
MySQL parameters, if all of them are set a MySQL connector will be created:
MYSQL_HOST=mysql-service
MYSQL_PORT=3306
MYSQL_DATABASE=prestodemo
MYSQL_USER=test
MYSQL_PASSWORD=test
The image contain:
openjdk:alpine)openjdk:alpine)The entrypoint will:
/etc/presto/node.propertiesCOORDINATOR environment variable/etc/presto/jvm.configHIVE_METASTORE_* environment variables are setContent type
Image
Digest
Size
82.5 MB
Last updated
over 9 years ago
docker pull johandry/presto-cli