FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        binutils-arm-none-eabi \
        ca-certificates \
        curl \
        gcc-arm-none-eabi \
        git \
        make \
        mercurial \
        patch \
        python3 \
        python3-pip \
        python3-setuptools \
        python3-wheel \
        unzip \
    && rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
    && apt-get install -y --no-install-recommends nodejs \
    && rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install --no-cache-dir "mbed-cli==1.10.5"

RUN arm-none-eabi-gcc --version \
    && python3 --version \
    && node --version \
    && mbed --version

WORKDIR /workspace
