# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://george-jen.gitbook.io/data-science-with-apach-spark/untitled-10.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
