|
1 | 1 | FROM ubuntu:24.04 |
2 | 2 |
|
3 | 3 | ARG DEBIAN_FRONTEND=noninteractive |
4 | | -ARG CUBECLT_VERSION=1.16.0 |
| 4 | +ARG CUBECLT_VERSION=1.21.0 |
5 | 5 | ARG CUBECLT_INSTALLER=cubeclt_${CUBECLT_VERSION}_installer.sh |
| 6 | +ARG UV_INSTALLER_URL=https://astral.sh/uv/install.sh |
6 | 7 |
|
7 | 8 | RUN echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list && \ |
8 | 9 | apt-get update && \ |
9 | 10 | apt-get install -y --no-install-recommends \ |
10 | | - git git-lfs curl \ |
| 11 | + bash ca-certificates curl git git-lfs \ |
11 | 12 | python3 python3-pip python3-venv \ |
12 | 13 | cmake ninja-build \ |
13 | 14 | g++ build-essential \ |
14 | 15 | libncurses5 libusb-1.0-0 \ |
15 | 16 | gdb && \ |
16 | | - git lfs install && \ |
| 17 | + git lfs install --system && \ |
17 | 18 | rm -rf /var/lib/apt/lists/* |
18 | 19 |
|
| 20 | +RUN curl -LsSf "${UV_INSTALLER_URL}" | sh && \ |
| 21 | + ln -sf /root/.local/bin/uv /usr/local/bin/uv && \ |
| 22 | + python3 -m pip install --break-system-packages \ |
| 23 | + Jinja2==3.1.5 \ |
| 24 | + GitPython==3.1.43 |
| 25 | + |
19 | 26 | # Install cubeclt (STM32CubeCLT) |
20 | 27 | WORKDIR /tmp |
21 | 28 |
|
22 | 29 | RUN git clone --depth 1 https://github.com/Hyperloop-UPV/cubeclt.git && \ |
23 | 30 | cd cubeclt && \ |
24 | | - git lfs pull && \ |
| 31 | + git lfs pull --include="${CUBECLT_INSTALLER}" && \ |
25 | 32 | chmod +x ${CUBECLT_INSTALLER} && \ |
26 | 33 | echo | LICENSE_ALREADY_ACCEPTED=1 ./${CUBECLT_INSTALLER} && \ |
| 34 | + actual_root="$(find /opt/st -maxdepth 1 -type d -name "stm32cubeclt_${CUBECLT_VERSION}*" | head -n1)" && \ |
| 35 | + test -n "${actual_root}" && \ |
| 36 | + mkdir -p /opt/ST && \ |
| 37 | + ln -s "${actual_root}" "/opt/ST/STM32CubeCLT_${CUBECLT_VERSION}" && \ |
27 | 38 | cd / && \ |
28 | 39 | rm -rf /tmp/cubeclt |
29 | 40 |
|
30 | | -ENV PATH="$PATH:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/GNU-tools-for-STM32/bin:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/CMake/bin:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/Ninja/bin" |
| 41 | +ENV STM32_CLT_ROOT=/opt/ST/STM32CubeCLT_${CUBECLT_VERSION} |
| 42 | +ENV HYPER_STM32CLT_ROOT=/opt/ST/STM32CubeCLT_${CUBECLT_VERSION} |
| 43 | +ENV PATH="/root/.local/bin:${STM32_CLT_ROOT}/GNU-tools-for-STM32/bin:${STM32_CLT_ROOT}/STM32CubeProgrammer/bin:${STM32_CLT_ROOT}/CMake/bin:${STM32_CLT_ROOT}/Ninja/bin:${PATH}" |
31 | 44 |
|
32 | 45 | WORKDIR /workspace |
0 commit comments