# Run PySpark and Delta Lake in VS Code With a Docker Dev Container

> Open a ready VS Code workspace that runs PySpark 3.5 and Delta Lake in Docker: a notebook with every lesson, the Spark UI on localhost:4040, Windows and Mac. Free download.

Page: https://datautility.in/blog/run-pyspark-in-vs-code-docker-dev-container
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Analyze & protect · pyspark vs code, spark dev container, pyspark docker vscode, delta lake vs code, jupyter pyspark docker, spark local vscode

If you prefer VS Code to a browser editor, the Spark Lab gives you a ready workspace: a Dev Container that runs the same lab image, a notebook with every lesson, and your own files. Open the folder, click Reopen in Container, and run.

Open the tool: [Spark Lab](https://datautility.in/sparklab)

## Steps

1. Install Docker Desktop and VS Code.

2. Run the Set up command from the [Spark Lab](https://datautility.in/pyspark-spark-ui-lab) page once. It builds the lab image.

3. On the Spark Lab page click **VS Code workspace** and unzip the download.

4. Open the folder in VS Code. Accept the Dev Containers extension, then click **Reopen in Container**.

5. Open `spark_lab.ipynb`, pick the Python kernel and run the cells. The Spark UI is at http://localhost:4040 while the notebook runs.

## What is in the workspace

- `.devcontainer/devcontainer.json`: the lab image, the shared data volume, port 4040 and the Python and Jupyter extensions.

- `spark_lab.ipynb`: every lesson, Spark basics and Delta Lake, as cells.

- `lessons/*.py` and `my_files/*.py`: the lessons and the files you made in the browser editor.

## Good to know

- Delta Lake is on for every Spark session in the image, so plain scripts can write Delta tables.

- The data volume is the same one the browser lab uses, so tables you write in VS Code show up there too.

- Stop the browser lab first if it runs: both use port 4040.

## How to use the Spark Lab: step by step

1. Run the Set up command once
2. Download the VS Code workspace
3. Reopen in Container
4. Run the notebook

## When to use the Spark Lab

- Working in your own editor with Git
- Running notebooks with Spark locally
- Using Copilot or other VS Code extensions on Spark code

## Also try

- [Learn PySpark and the Spark UI free](https://datautility.in/blog/learn-pyspark-and-the-spark-ui-free)
- [Free playgrounds for PySpark, Delta Lake and dbt](https://datautility.in/blog/free-data-engineering-playgrounds-pyspark-delta-dbt)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
