new file: .devcontainer/devcontainer.json

new file:   CubeClt/Dockerfile
	new file:   CubeClt/Resources/CubeCLT/install.sh
	new file:   CubeClt/Resources/Scripts/reinstall-cmake.sh
	new file:   CubeClt/build_and_publish.sh
	new file:   CubeMx/Dockerfile
	new file:   CubeMx/Resources/CubeMX/install-cubemx.sh
	new file:   CubeMx/build_and_publish.sh
	modified:   README.md
This commit is contained in:
2025-03-12 23:45:57 +01:00
parent a33d02941c
commit e2627bcd52
9 changed files with 219 additions and 1 deletions

24
CubeMx/Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM nexus.springblast.de:8082/carly/docker-stm32/cubeclt:latest
ARG INSTALL_CUBEMX="true"
# Install Xpra, X server, and window manager
RUN apt-get update && apt-get install -y xpra xorg openbox xauth xterm
RUN apt-get update && apt-get install -y \
libxext6 \
libxrender1 \
libxtst6 \
libxi6
# Optionally install the CubeMX
COPY ./Resources/CubeMX/cubemx.tar.gz /home/vscode
RUN tar -xvf /home/vscode/cubemx.tar.gz
# RUN if [ "${INSTALL_CUBEMX}" = "true" ]; then \
# chmod +x /tmp/CubeMX/install-cubemx.sh && /tmp/CubeMX/install-cubemx.sh; \
# fi
# && rm -rf /tmp/CubeMX
#CMD xpra start --start=xeyes --bind-tcp=0.0.0.0:14500 --html=on --daemon=no && bash
#sudo xpra start :100 --start=xterm --no-daemon --bind-tcp=0.0.0.0:14500 --html=on

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Set the script to fail if any command fails.
set -e
# Cleanup temporary directory and associated files when exiting the script.
cleanup() {
EXIT_CODE=$?
set +e
if [[ -n "${TMP_DIR}" ]]; then
echo "Executing cleanup of tmp files"
rm -Rf "${TMP_DIR}"
fi
exit $EXIT_CODE
}
echo "Installing CubeMX..."
# Extract zip file
unzip -q /tmp/CubeMX/en.stm32cubemx-lin-v6-13-0.zip -d /tmp/CubeMX

15
CubeMx/build_and_publish.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
push=false
# Process oprions
while getopts "pt:" opt; do
case $opt in
p) push=true;;
t) tag=$OPTARG;;
\?) echo "Invalid option: -$OPTARG" >&2 ;;
:) echo "Option -$OPTARG requires an argument." >&2 ;;
esac
done
docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubemx:$tag .