# Use Docker to Compile Linux for ESP32-S3

## Overview

https://www.youtube.com/live/f6ZhVPpiNzM?

Have you ever wanted to run Linux on a microcontroller like the ESP32-S3? GitHub user [jcmvbkbc](https://github.com/jcmvbkbc) has a [Linux for ESP32-S3 script](https://gist.github.com/jcmvbkbc/316e6da728021c8ff670a24e674a35e6) that lets you do just that! However, compiling it can be tricky depending on your operating system with all of the toolchain dependencies. Don't worry though because there is a way around all of that: [a Docker container](https://www.hanselman.com/blog/docker-101-and-how-do-containers-work)! A container is a lightweight and fast virtual computer. The best part is it's easy for people to run no matter what operating system they are on. It's also much simpler and smaller than VirtualBox because it has only the bare essentials.

In this guide, you'll setup and install Docker, run a test Dockerfile to create a test container, run the ESP32-S3 Linux Dockerfile, upload the compiled files to the ESP32-S3 and then perform the ultimate skateboard trick: boot Linux on an ESP32-S3!

This version of Linux is barebones, the file system is utilizing [cramfs](https://en.wikipedia.org/wiki/Cramfs), so don't expect it to be like booting up a Raspberry Pi with Raspberry Pi OS. You'll access it over serial and you'll only be able to do super basic things but you'll learn a ton along the way.

## Parts
### Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM

[Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM](https://www.adafruit.com/product/5500)
What's Metro-shaped and has an ESP32-S3&nbsp;WiFi module? What has a STEMMA QT connector for I2C devices and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - it's the new...

In Stock
[Buy Now](https://www.adafruit.com/product/5500)
[Related Guides to the Product](https://learn.adafruit.com/products/5500/guides)
![Angled shot of black, credit-card-sized dev board.](https://cdn-shop.adafruit.com/640x480/5500-10.jpg)

### USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi

[USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi](https://www.adafruit.com/product/954)
The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB\<-\>Serial conversion chip and at the end of the 36" cable are four wire - red power, black ground, white RX into USB port, and green TX out...

In Stock
[Buy Now](https://www.adafruit.com/product/954)
[Related Guides to the Product](https://learn.adafruit.com/products/954/guides)
![USB to TTL Serial Cable With Type A plug and 4 wire sockets](https://cdn-shop.adafruit.com/640x480/954-02.jpg)

### Break-away 0.1" 36-pin strip male header - Black - 10 pack

[Break-away 0.1" 36-pin strip male header - Black - 10 pack](https://www.adafruit.com/product/392)
Breakaway header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, fits into any breakout or breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/392)
[Related Guides to the Product](https://learn.adafruit.com/products/392/guides)
![10 pieces of Break-away 0.1 inch 36-pin strip male header](https://cdn-shop.adafruit.com/640x480/392-01.jpg)

### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

- [Next Page](https://learn.adafruit.com/docker-esp32-s3-linux/install-docker.md)

## Featured Products

### Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM

[Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM](https://www.adafruit.com/product/5500)
What's Metro-shaped and has an ESP32-S3&nbsp;WiFi module? What has a STEMMA QT connector for I2C devices and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - it's the new...

In Stock
[Buy Now](https://www.adafruit.com/product/5500)
[Related Guides to the Product](https://learn.adafruit.com/products/5500/guides)
### USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi

[USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi](https://www.adafruit.com/product/954)
The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB\<-\>Serial conversion chip and at the end of the 36" cable are four wire - red power, black ground, white RX into USB port, and green TX out...

In Stock
[Buy Now](https://www.adafruit.com/product/954)
[Related Guides to the Product](https://learn.adafruit.com/products/954/guides)
### Break-away 0.1" 36-pin strip male header - Black - 10 pack

[Break-away 0.1" 36-pin strip male header - Black - 10 pack](https://www.adafruit.com/product/392)
Breakaway header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, fits into any breakout or breadboard, etc. We go through these guys real fast, and thought that given how handy they are, we'd offer them in a pack of ten!<br...></br...>

In Stock
[Buy Now](https://www.adafruit.com/product/392)
[Related Guides to the Product](https://learn.adafruit.com/products/392/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)

## Related Guides

- [Adafruit Metro ESP32-S3](https://learn.adafruit.com/adafruit-metro-esp32-s3.md)
- [MP3 Playback with CircuitPython](https://learn.adafruit.com/mp3-playback-with-circuitpython.md)
- [Networking in CircuitPython](https://learn.adafruit.com/networking-in-circuitpython.md)
- [Plotting Offline Data - JSONL to CSV files, filters and graphs](https://learn.adafruit.com/plotting-offline-data-jsonl-to-csv-files-filters-and-graphs.md)
- [ESP-NOW in CircuitPython](https://learn.adafruit.com/esp-now-in-circuitpython.md)
- [Tile-Matching Game on the Fruit Jam and Metro RP2350](https://learn.adafruit.com/tile-matching-game-on-the-adafruit-metro-rp2350.md)
- [PicoDVI Arduino Library: Video Out for RP2040 Boards](https://learn.adafruit.com/picodvi-arduino-library-video-out-for-rp2040-boards.md)
- [Halloween Pumpkin](https://learn.adafruit.com/halloween-pumpkin.md)
- [LED Drone Matrix](https://learn.adafruit.com/led-matrix-drone.md)
- [Adafruit Metro M4 Express AirLift (WiFi)](https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi.md)
- [n3rfgun](https://learn.adafruit.com/n3rfgun.md)
- [Create a Memory Game on Fruit Jam Metro RP2350](https://learn.adafruit.com/create-a-memory-game-on-metro-rp2350.md)
- [Using a Raspberry Pi as a Router](https://learn.adafruit.com/using-a-raspberry-pi-as-a-router.md)
- [How to Convert a JVC Videosphere into a Monitor for Raspberry Pi and Desktop Computers](https://learn.adafruit.com/using-a-videosphere-as-a-digital-monitor.md)
- [Adafruit Metro RP2040](https://learn.adafruit.com/adafruit-metro-rp2040.md)
