# Docker container for building binaries for stm-32 microcontrollers with CLion IDE

FROM ubuntu:22.04
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN --mount=type=cache,target=/var/lib/apt \
    apt-get -y update && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends \
        python3 python3-pip lsb-release software-properties-common rename wget git \
        ninja-build make gdb gdbserver pkg-config \
        gperf linux-tools-generic linux-tools-common valgrind \
        clang \
        gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib\
        cmake \
        catch2 \
        zsh

RUN useradd -U \
    developer

USER developer:developer