2024-09-06 6:04 AM - last edited on 2024-09-06 7:14 AM by mƎALLEm
Hello
I am new to this forum, so if I am at the wrong place, let me know.
How can this software: https://www.st.com/en/development-tools/stm32cubeclt.html be installed from a script? Namely into docker container?
I get the following error:
``` DISPLAY not set. Cannot display license. Aborting. ```
Thanks in advance.
Solved! Go to Solution.
2025-03-24 12:31 AM
It is exactely what we do.
2025-03-24 12:32 AM
My bad, it works also with 1.18.0. I was using the generic Linux package instead of the Debian one. With the Debian package and an Ubuntu base image it's working well.
2025-10-15 12:14 PM
Evening everyone,
This is something we have been using in our company for a while now when doing CI-pipelines and deploying devcontainer tools for our employees. For some reason I previously dug the tools from CubeIDE package, which works also pretty good.
In this approach only the absolutely mandatory stuff is put inside the container. There are some libraries which could be removed, but 2,3gig image is not that bad, since it serves its purpose as a build container.
We use CMake and Ninja for building our FW and started that before STM had proper tooling for VS Code, so basically it is vanilla setup.
1. Download the cubeclt package for debian.
2. Save this to Dockerfile in a separate folder with the .zip of CubeCLT
3. docker build -t cubeclt .
FROM debian:bookworm-slim AS basecontainer
ARG CUBECLT=st-stm32cubeclt_1.19.0_25876_20250729_1159_amd64.deb_bundle
ENV LICENSE_ALREADY_ACCEPTED=1
WORKDIR /workdir
COPY ${CUBECLT}.sh.zip .
RUN apt update && apt install unzip && unzip ${CUBECLT}.sh.zip && chmod 777 ./${CUBECLT}.sh && ./${CUBECLT}.sh --tar xvf \
&& rm ${CUBECLT}.sh.zip \
&& rm ${CUBECLT}.sh && ./setup.sh && rm -rf *
## Fresh container for the final build
FROM debian:bookworm-slim AS cubeclt
LABEL maintainer="Juha Viitanen <juha.viitanen@exertus.fi>"
LABEL purpose="STM32 H7 basecontainer"
LABEL version="1.0"
LABEL description="This Docker container sets up STM32CubeIDE and STM32 build tools for development."
LABEL user="exertus"
# Install local user
ARG USERNAME=exertus
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& usermod -aG root $USERNAME
# Install environmental variables
ENV CMAKE_INSTALL_PREFIX=/opt/toolchain/arm-none-eabi
ENV TOOLCHAIN_DIR=${CMAKE_INSTALL_PREFIX}
ENV PREFIX=${CMAKE_INSTALL_PREFIX}
ENV CROSS_COMPILE=arm-none-eabi-
ENV CC=${CROSS_COMPILE}gcc
ENV CXX=${CROSS_COMPILE}g++
ENV LD=${CROSS_COMPILE}ld
ENV AR=${CROSS_COMPILE}ar
ENV AS=${CROSS_COMPILE}as
ENV STRIP=${CROSS_COMPILE}strip
ENV PATH=${PATH}:${TOOLCHAIN_DIR}/bin
RUN mkdir /opt/toolchain
# Copy toolchain and required applications for previous container
COPY --from=basecontainer /opt/st/stm32cubeclt_1.19.0/GNU-tools-for-STM32 ${TOOLCHAIN_DIR}
COPY --from=basecontainer /opt/st/stm32cubeclt_1.19.0/STM32CubeProgrammer /usr/
# Package installation
RUN apt-get update \
&& apt-get install -y tzdata locales ca-certificates\
&& echo "Europe/Helsinki" > /etc/timezone \
&& ln -sf /usr/share/zoneinfo/Europe/Helsinki /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata \
# Install tools
&& apt-get install --no-install-recommends -y unzip zip ninja-build\
# STM CUBE Programmer dependencies
libglib2.0-dev libusb-1.0-0 libgssapi-krb5-2 \
# Build tools
cmake make git \
# Sudo
sudo \
# Default user exertus for sudoers, if local user is used
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
# Remove cache
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2025-12-15 1:39 AM
Hi,
I would like to create a devcontainer workspace to develop stm32 applications. I found that when I install stm32 vscode extension it can install every needed libraries like cmake, debugger etc. Is it possbile to pre install these into the docker file? I don't want to install manually every docker container creation.
2025-12-15 1:44 AM
Hi,
I'm not sure to understand the issue. The Dockerfile is here to add whatever you need in your container.
So, yes you can add what you want in your docker image.
2025-12-15 2:14 AM
I know that I can add everything into the dockerfile. My problem is that I don't know what vscode installs when I click yes during the extension installation.
2025-12-15 3:03 AM
I'am a little bit confused. Why CubeCLT is needed for VsCode development? When I install CubeCLT the extension still would like to install these bundles and without installation it would failed to setup the project.
About to install following cube bundle(s): stlink-upgrader@3.16.8+st.3 - stlink-server@2.1.1+st.7 - stlink-gdbserver@7.11.0+st.1 - st-arm-clangd@19.1.2+st.3 - rtos-proxy@0.17.0+st.3 - programmer@2.20.0 - pack-manager-snapshot@2025.8.6 - pack-manager@0.3.12 - node@20.19.4+st.1 - ninja@1.13.1+st.1 - gnu-tools-for-stm32-13_3_1-description@1.0.1+st.1 - gnu-tools-for-stm32@13.3.1+st.9 - gnu-gdb-for-stm32@13.3.1+st.10 - cube-code-manifest@1.0.6+st.1 - cube-code-doc@0.0.5+st.1 - cube-cmsis-scanner@1.1.3 - cmake@4.0.1+st.3 - adoptium-jre@17.0.15+6.st.1
But when I install just the bundles everything is working without the need of CubeCLT.
2025-12-15 3:14 AM
Hi Janos,
If you do not have any needs for implementing stuff for CI/CD-pipelines or deploying same environment to multiple ie. team members exactly the same, then having a Docker and devcontainer is not required. You can use like you described.
Many projects specially in commercial side have started to develop before there were such a large ecosystem of plugins for VS Code.
br.
Juha
2025-12-15 3:55 AM
Hi Juha,
I need what you described. I would like to create CI/CD pipeline, have a common dev environment and use it for CI also. Previously I worked with vscode+devcontainer for ROS2 application development. It was very useful that all of the used tools was preinstalled, the workspace was setup to run build, static code analysis, tests and etc.
I would like to do the same with stm32. Just install docker, vscode and launch the devcontainer.
2025-12-15 5:13 AM - edited 2025-12-15 5:35 AM
On my side, I also build everything from GitLab CI inside a Docker container (using CubeIDE in headless mode). I haven’t taken the time yet to migrate to VS Code for embedded projects, especially since until the past few months it was quite buggy (as is often the case with ST tools).
I believe it’s much more stable now, and I’ll probably migrate for upcoming projects, so I’m very interested in what you’re trying to achieve. Don’t hesitate to share more details once you have everything up and running. Good luck!