This link explains how to run Apache Drill on Docker.
docker run -i --name drill-1.18.0 -p 8047:8047 -t apache/drill:1.18.0 /bin/bash
I need to run it on Docker Compose, so I set it up:
version: "3.0"
services:
drill:
image: apache/drill:latest
ports:
- "8047:8047"
volumes:
- vol_dask_data:/data
entrypoint:
- /bin/bash
And start it like so:
docker-compose up -d
But the container ends without doing anything, even though I start docker compose with -d
.
How to start Drill in Docker Compose?
The Drill Dockerfile ends with:
ENTRYPOINT /opt/drill/bin/drill-embedded
In the docker run
command, this particular construction completely ignores the command given after the image name. In your Compose setup, you replace this (with an entrypoint:
line) with a Bash shell, but this shell will immediately exit.
The other important difference between the docker run
command and the Compose setup is the -it
options. If you try that docker run
command without either -i
or -t
you will see the Drill prompt, and then the container will immediately exit. If you add back -i
then it will wait for a command, and while it's doing that it will accept network connections. The Compose equivalent to this is the stdin_open: true
command.
With this docker-compose.yml
I can see the Drill UI on http://localhost:8047
:
version: "3.8" # a more current version
services:
drill:
image: apache/drill:latest
ports:
- "8047:8047"
stdin_open: true # add this line
# do not override entrypoint: or command:
# include volumes: if required