Base Debian image contains following services inside:
Either build image:
# Clone repo
git clone [email protected]:kazanzhy/dockers.git
cd dockers/spark
# Build the new image
docker build -t kazanzhy/spark .
Or get image with default configs from Docker Hub:
docker pull kazanzhy/spark:latest
Run Spark:
docker run -d -p 7077:7077 -p 7070:7070 --name spark_app kazanzhy/spark
Run Spark with additional jars, like JDBC:
docker run -d -p 7077:7077 -p 7070:7070 --name spark_app -v $(pwd)/jars:/home/spark/jars kazanzhy/spark
Follow: http://localhost:7070
Connect: spark://localhost:7077
Interact with container:
docker exec -it spark_app bash
Start/Stop/Remove container:
docker (start | stop | rm) spark_app
Use all services in one container may be not productive.
For the much better performance use these services in separate containers and run using Docker Compose.
git clone [email protected]:kazanzhy/dockers.git
cd dockers/spark
docker-compose docker-compose.yaml up
It runs separate containers with:
You can edit docker-compose.yaml and copy-paste more workers.
Content type
Image
Digest
Size
689.2 MB
Last updated
about 5 years ago
docker pull kazanzhy/spark