Using Docker to create a build environment

Posted on
  • I am fast becoming a fan of "docker" but am still an infant in its details. That said, I used Espruino for ESP8266 as a test to see if we could build a docker image that would provide an environment for building the latest Espruino for ESP8266.

    Assuming you have installed a docker engine locally, run:

    $ docker -it kolban/espruino
    

    You will end up in a shell prompt inside the container. From there, change into Espruino and run make.

    If you want to build your own docker image, here is the Dockerfile I used to build this image:

    FROM vowstar/esp8266
    MAINTAINER Neil Kolban <kolban1@kolban.com>
    RUN git clone https://github.com/espruino/Espruino.git­
    RUN wget http://espressif.com/sites/default/files­/sdks/esp8266_nonos_sdk_v2.0.0_16_08_10.­zip
    RUN wget http://espressif.com/sites/default/files­/sdks/esp8266_nonos_sdk_v2.0.0_patch_16_­08_09.zip
    RUN unzip esp8266_nonos_sdk_v2.0.0_16_08_10.zip -d /opt/esp-sdk
    RUN unzip -o esp8266_nonos_sdk_v2.0.0_patch_16_08_09.­zip -d /opt/esp-sdk/ESP8266_NONOS_SDK/lib
    RUN rm -f esp8266_nonos_sdk_v2.0.0_16_08_10.zip esp8266_nonos_sdk_v2.0.0_patch_16_08_09.­zip
    ENV ESP8266_BOARD=1
    ENV FLASH_4MB=1
    ENV ESP8266_SDK_ROOT=/opt/esp-sdk/ESP8266_NO­NOS_SDK
    ENV ESPHOSTNAME=espruino:88
    ENV RELEASE=1
    

    If you play with this and like it, then we'll see if we can't get a Dockerfile for ESP8266 added into the github repository for Espruino. I see that there are a couple there already so we will want to examine, merge or simply use.

    I fully expect that most of y'all are way ahead on your docker journey than myself, so apologies if this is no news/value.

  • There is already this one:

    https://github.com/espruino/Espruino/blo­b/master/Dockerfile-esp8266

    It just needs the sdk updated as far as I'm aware...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Using Docker to create a build environment

Posted by Avatar for Kolban @Kolban

Actions