STM32 – dockerized toolchain

Lightweight docker image built on top of alpine:3.10 with installed ARM-none-eabi toolchain and few additional tools:

  • ARM-none-eabi toolchain (2019; GNU Tools for Arm Embedded Processors 8-2019-q3-update)
  • stlink (v1.5)
  • make (v4.2)
  • cmake (v3.14)



Bellow you can find recommended simple one-line installer that pulls the newest docker-image and installs stm32-toolchain script into “/usr/bin/” directory.

curl | bash -s --

Getting started

  1. Install toolchain using recommended simple one-line installer.
  2. Use super command stm32-toolchain for all toolchain binaries.
  3. Execute toolchain binaries inside your working/project directory.


$ cd your-project/
$ stm32-toolchain arm-none-eabi-cpp --version
$ stm32-toolchain st-flash --version
$ stm32-toolchain make -version
$ stm32-toolchain cmake -version
$ stm32-toolchain make && make flash

Building image locally

git clone
cd stm32-toolchain
docker build --rm -t lpodkalicki/stm32-toolchain:latest .

An example of running a toolchain’s executable using “docker run”

docker run --rm --privileged -v $(pwd):/build lpodkalicki/stm32-toolchain arm-none-eabi-cpp -version

2 thoughts on “STM32 – dockerized toolchain

  1. Hi!
    Your work is very interesting. I would you ask, why product of compiling (main.elf, main.bin) is own of the root? It complicates some works.
    Best regards.

    • Hi!
      the compiler output files are created inside docker instance which uses root user. So, that’s why it has such privileges. I didn’t find it crucial to make it work with a “current user”. Probably, it’s a metter of “docker run” settings (gid/uid) to make it work the way you want.

Leave a Comment