micropython-builder
Docker images for MicroPython development and compilation
2.4K
Docker images for MicroPython development and compilation
| Source Code | https://github.com/MansfieldTX-MattR/micropython-builder |
| Docker Hub | https://hub.docker.com/r/mattrmansfieldtx/micropython-builder |
Images are built and tagged according to the port they are intended for. At this time, the following ports are available:
| Port | Description | Tags |
|---|---|---|
unix | The base image for all other ports. | latest-unix, 1.28-unix, 1.28.0-unix, 1.27-unix, 1.27.0-unix, 1.26-unix, 1.26.1-unix, 1.26.0-unix, 1.25-unix, 1.25.0-unix, 1.24-unix, 1.24.1-unix, 1.24.0-unix, 1.23-unix, 1.23.0-unix, 1.22-unix, 1.22.2-unix |
rp2 | Image for RP2xxx-based boards. | latest-rp2, 1.28-rp2, 1.28.0-rp2, 1.27-rp2, 1.27.0-rp2, 1.26-rp2, 1.26.1-rp2, 1.26.0-rp2, 1.25-rp2, 1.25.0-rp2, 1.24-rp2, 1.24.1-rp2, 1.24.0-rp2, 1.23-rp2, 1.23.0-rp2, 1.22-rp2, 1.22.2-rp2 |
All version tags are derived from the releases/tags of the MicroPython repository itself.
Configuration for the build is done through the following environment variables:
MPY_BOARD
FIRMWARE_DEST
${HOME}/firmware (or specifically, /home/app/firmware).EXTRA_BUILD_META
key1=value1,key2=value2,....FROZEN_MANIFEST
manifest.py file and any files it references must exist on the container.A helper script is provided in this repository to build firmware and as a usage example (see scripts/build_firmware.py). If not using the helper script, you can build firmware by running the following:
# Assuming the local destination is `./firmware`
mkdir -p firmware
docker run --rm \
--mount type=bind,source=$(pwd)/firmware,target=/home/app/firmware \
-e FIRMWARE_DEST=/home/app/firmware \
-e MPY_BOARD=YOUR_BOARD \
-e EXTRA_BUILD_META=key1=value1,key2=value2 \
mattrmansfieldtx/micropython-builder:latest-rp2
If building with a manifest file:
# Assuming the local destination is `./firmware` and the source files are in `./src`
mkdir -p firmware
docker run --rm \
--mount type=bind,source=$(pwd)/firmware,target=/home/app/firmware \
--mount type=bind,source=$(pwd)/src,target=/home/app/src \
-e FIRMWARE_DEST=/home/app/firmware \
-e MPY_BOARD=YOUR_BOARD \
-e FROZEN_MANIFEST=/home/app/src/manifest.py \
mattrmansfieldtx/micropython-builder:latest-rp2
After a successful build, a build_metadata.json file will be created in the FIRMWARE_DEST directory along with the firmware binaries.
It contains the following information:
{
"mpy_commit": "abcdefg",
"file_checksum": "1234567890abcdef",
"file_checksums": {
"src/file1.py": "1234567890abcdef",
"src/file2.py": "1234567890abcdef"
}
}
mpy_commit
file_checksum
null otherwise.file_checksums
Any extra metadata specified in the EXTRA_BUILD_META environment variable will be added to this as top-level keys.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is not affiliated with or endorsed by the MicroPython project or its contributors. The MicroPython project is licensed separately. See the MicroPython repository for details.
Content type
Image
Digest
sha256:25be599d7…
Size
184.9 MB
Last updated
2 months ago
docker pull mattrmansfieldtx/micropython-builder:sha-1b39603-unix