This image provides a dockerized toolchain to compile software for the ESP8266.
8.0K
Uses a fork of the official SDK from here:
https://github.com/b0wter/ESP8266_RTOS_SDK
to enable you to build your own projects. Start your projects from this template for an easier start:
https://github.com/espressif/ESP8266_RTOS_SDK/tree/master/examples/get-started/project_template
You can find the source code and other information on this project on:
https://dev.azure.com/b0wter/IOT%20Base
Use docker run to build your source code. You need to supply two arguments:
docker run --rm -v $BASE_DIR:/mnt/project -v $OUTPUT_DIR:/mnt/output b0wter/espbuilder
$BASE_DIR is the path to your source code. Please make sure that the sdkconfig file exists in this folder.
$OUTPUT_DIR is where the results of the build process are stored. Make sure that anybody can write to this folder!
The build process will update components/git_version.h and components/version.h in case they exist.
The build process creates a certificate in case you want to offer a secure AP. It uses prime256v1 (ECC) by default because it's widespread and supported by default by the ESP sdk (even if it is presumably weaker than other curves). To create a rsa certificate (2048 bits because the ESP can't handle more) you may supply -e ENV_CERTIFICATE_TYPE=rsa to the docker run command.
A /components/Key.h file is created and automatically filled with the hardcoded certificate and key files:
#ifndef COMPONENTS_KEYS_H_
#define COMPONENTS_KEYS_H_
static const unsigned char server_key_pem_256[] =
{
0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E,
0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4B,
...
0x54, 0x45, 0x20, 0x4B, 0x45, 0x59, 0x2D, 0x2D, 0x2D, 0x2D,
0x2D, 0x0A
};
static const int sizeof_server_key_pem_256 = sizeof(server_key_pem_256);
/* ./certs/4096/cert.pem, 256-bit */
static const unsigned char server_cert_pem_256[] =
{
0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x42, 0x45, 0x47, 0x49, 0x4E,
0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41,
...
0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43,
0x41, 0x54, 0x45, 0x2D, 0x2D, 0x2D, 0x2D, 0x2D, 0x0A
};
static const int sizeof_server_cert_pem_256 = sizeof(server_cert_pem_256);
#endif /* COMPONENTS_KEYS_H_ */
Content type
Image
Digest
Size
236.7 MB
Last updated
about 7 years ago
docker pull b0wter/espbuilder