GithubHelp home page GithubHelp logo

esp32_docker's Introduction

ESP-IDF Docker Image

This is a Docker image for the Espressif IoT Development Framework (ESP-IDF). It is intended for building applications and libraries with specific versions of ESP-IDF, when doing automated builds.

This image contains a copy of ESP-IDF and all the tools necessary to build ESP-IDF projects.

Build

This build will create a user to work with. If you do not specify the username it will default to esp32_user, You can set the username by building with --build-arg USERNAME=username this user will be UID 1000. This is so that if you mount directories on ubuntu it will get UID 1000 which is usually a real user (The first user created)

In order to build some of the things I build you will need the /home/USERNAME directory, so I usually do a docker volume create volume_name_home_username and then use that to mount the docker home directory.

docker build . --build-arg USERNAME=username -t esp-idf:v5.1.2

Basic Usage

I usually run bash and then cd to a source directory and do my build. I mount /dev/bus/usb so I can use the /dev/ttyUSBx devices to program the ESP32.

here is the basic command I use:

docker run --rm --privileged  -v /dev/bus/usb:/dev/bus/usb \
-v esp32_home_dir_username:/home/username -v ~/src:/home/mlw/src \
-it esp-idf:v5.1.2 bash

If you need to be root you can change bash to

docker run --rm --privileged  -v /dev/bus/usb:/dev/bus/usb \
-v esp32_home_dir_username:/home/username -v ~/src:/home/username/src \
-it esp-idf:v5.1.2 sudo bash

This should work, I have not tested it. Build a project located in the current directory using idf.py build command:

docker run --rm -v $PWD:/project -w /project esp-idf:v5.1.2 idf.py build

esp32_docker's People

Contributors

mishafarms avatar

Stargazers

Scotty Franzyshen avatar

Watchers

 avatar Scotty Franzyshen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.