FROM docker.springblast.de/stm32/cubeclt:latest

ARG LICENSE_ALREADY_ACCEPTED=1

USER root
# Install Xpra, X server, and window manager
# RUN apt-get update && apt-get install -y xpra xterm

RUN apt-get update && apt-get install --no-install-recommends -y chromium

RUN mkdir /home/temp
WORKDIR /home/temp
RUN wget -q https://nexus.springblast.de/repository/file-repo/Stm32/en.stm32cubemx-lin-v6-14-1.zip

RUN unzip en.stm32cubemx-lin-v6-14-1.zip
RUN chmod +x SetupSTM32CubeMX-6.14.1


COPY ./Resources/auto-install.xml .
RUN ./SetupSTM32CubeMX-6.14.1 auto-install.xml

RUN rm -rf /home/temp

RUN apt-get clean && \
    rm -rf /var/lib/apt/lists/*