Skip to content

Repository files navigation

docker-spark

Docker HubDocker Build StatusDocker PullsDocker StarsBuild Status

This repository contains Dockerfile of Apache Spark for Docker's automated build published to the public Docker Hub Registry.

Installation

Pull the image from the Docker repository.

docker pull cjonesy/docker-spark:latest

Build

docker build --rm -t cjonesy/docker-spark:latest .

Usage

For a Spark shell inside the container

docker run -it cjonesy/docker-spark:latest spark-shell

For a PySpark shell inside the container

docker run -it cjonesy/docker-spark:latest pyspark

For a Bash shell inside the container

docker run -it cjonesy/docker-spark:latest bash

Configuration

spark-defaults.conf

It is possible to override the following values in spark-defaults.conf from environment variables.

PropertyEnvironment VariableDefault Value
spark.driver.coresSPARK_DRIVER_CORES1
spark.driver.maxResultSizeSPARK_DRIVER_MAXRESULTSIZE1g
spark.driver.memorySPARK_DRIVER_MEMORY5g
spark.exector.memorySPARK_EXECUTOR_MEMORY5g
spark.local.dirSPARK_LOCAL_DIR/tmp
spark.logConfSPARK_LOGCONFtrue
spark.masterSPARK_MASTERlocal
spark.driver.superviseSPARK_DRIVER_SUPERVISEfalse
spark.driver.extraClassPathSPARK_DRIVER_EXTRACLASSPATH/jars/*
spark.executor.extraClassPathSPARK_EXECUTOR_EXTRACLASSPATH/jars/*
spark.python.worker.memorySPARK_PYTHON_WORKER_MEMORY512m
spark.ui.enabledSPARK_UI_ENABLEDtrue
spark.eventLog.enabledSPARK_EVENTLOG_ENABLEDfalse
spark.eventLog.dirSPARK_EVENTLOG_DIRfile:///tmp/spark-events

Example:

docker run -e SPARK_UI_ENABLED=false -it cjonesy/docker-spark spark-shell

How to contribute

Imposter syndrome disclaimer: I want your help. No really, I do.

There might be a little voice inside that tells you you're not ready; that you need to do one more tutorial, or learn another framework, or write a few more blog posts before you can help me with this project.

I assure you, that's not the case.

This project has some clear Contribution Guidelines and expectations that you can read here (CONTRIBUTING).

The contribution guidelines outline the process that you'll need to follow to get a patch merged. By making expectations and process explicit, I hope it will make it easier for you to contribute.

And you don't just have to write code. You can help out by writing documentation, tests, or even by giving feedback about this work. (And yes, that includes giving feedback about the contribution guidelines.)

Thank you for contributing!

About

A Docker image for Apache Spark

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages