diff options
Diffstat (limited to 'docker/spark-test/worker')
-rw-r--r-- | docker/spark-test/worker/Dockerfile | 5 | ||||
-rwxr-xr-x | docker/spark-test/worker/default_cmd | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/docker/spark-test/worker/Dockerfile b/docker/spark-test/worker/Dockerfile new file mode 100644 index 0000000000..5690678051 --- /dev/null +++ b/docker/spark-test/worker/Dockerfile @@ -0,0 +1,5 @@ +# Spark Worker +FROM spark-test-base +ENV SPARK_WORKER_PORT 8888 +ADD default_cmd /root/ +ENTRYPOINT ["/root/default_cmd"] diff --git a/docker/spark-test/worker/default_cmd b/docker/spark-test/worker/default_cmd new file mode 100755 index 0000000000..360993f17c --- /dev/null +++ b/docker/spark-test/worker/default_cmd @@ -0,0 +1,4 @@ +#!/bin/bash +IP=$(ip -o -4 addr list eth0 | perl -n -e 'if (m{inet\s([\d\.]+)\/\d+\s}xms) { print $1 }') +echo "CONTAINER_IP=$IP" +/opt/spark/spark-class org.apache.spark.deploy.worker.Worker $1 |