index

In the same docker_dir directory, create docker-compose.yml

vi docker-compose.yml, add below, save and exit

version: "3.3"

services:

spark-master:

image: spark\_lab/spark:latest

container\_name: spark-master

hostname: spark-master

ports:

  - "8080:8080"

  - "7077:7077"

networks:

  - spark-network

environment:

  - "SPARK\_LOCAL\_IP=spark-master"

  - "SPARK\_MASTER\_PORT=7077"

  - "SPARK\_MASTER\_WEBUI\_PORT=8080"

command: "/start-master.sh"  

spark-worker:

image: spark\_lab/spark:latest

depends\_on:

  - spark-master

ports:

  - 8080

networks:

  - spark-network

environment:

  - "SPARK\_MASTER=spark://spark-master:7077"

  - "SPARK\_WORKER\_WEBUI\_PORT=8080"

command: "/start-worker.sh"

networks:

spark-network:

driver: bridge

ipam:

  driver: default

Last updated