modified: CubeClt/Dockerfile

modified:   CubeClt/build_and_publish.sh
	modified:   CubeMx/Dockerfile
	new file:   CubeMx/Resources/CubeMX/start-cubemx.sh
	modified:   CubeMx/build_and_publish.sh
	new file:   build_and_publish.sh
This commit is contained in:
2025-03-13 01:23:10 +01:00
parent e2627bcd52
commit 77dc72ce64
6 changed files with 50 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ RUN if [ "${INSTALL_CUBE_CLT}" = "true" ]; then \
fi \ fi \
&& rm -rf /tmp/CubeCLT && rm -rf /tmp/CubeCLT
RUN apt-get clean
# [Optional] Uncomment this section to install additional vcpkg ports. # [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>" # RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
script_dir=$(dirname "$(readlink -f "$0")")
push=false push=false
# Process oprions # Process oprions
@@ -13,8 +14,8 @@ done
docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubeclt:$tag . docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubeclt:$tag $script_dir/.
docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubeclt:latest . docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubeclt:latest $script_dir/.
if [ "$push" = true ]; then if [ "$push" = true ]; then
docker push nexus.springblast.de:8082/carly/docker-stm32/cubeclt:$tag docker push nexus.springblast.de:8082/carly/docker-stm32/cubeclt:$tag

View File

@@ -3,17 +3,24 @@ FROM nexus.springblast.de:8082/carly/docker-stm32/cubeclt:latest
ARG INSTALL_CUBEMX="true" ARG INSTALL_CUBEMX="true"
# Install Xpra, X server, and window manager # 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 xpra xterm
RUN apt-get update && apt-get install -y \
libxext6 \
libxrender1 \
libxtst6 \
libxi6
# Optionally install the CubeMX # Optionally install the CubeMX
COPY ./Resources/CubeMX/cubemx.tar.gz /home/vscode COPY ./Resources/CubeMX/cubemx.tar.gz /home/vscode
RUN tar -xvf /home/vscode/cubemx.tar.gz RUN tar -xvf /home/vscode/cubemx.tar.gz -C /home/vscode
RUN rm /home/vscode/cubemx.tar.gz
COPY ./Resources/CubeMX/start-cubemx.sh /home/vscode/
RUN chmod +x /home/vscode/start-cubemx.sh
RUN apt-get update && apt-get install -y python3-setuptools
RUN cd /home/vscode && git clone --branch v6.2.5 --single-branch https://github.com/Xpra-org/xpra
RUN cd /home/vscode/xpra && ./setup.py install-repo && apt-get update && apt-get install -y xpra
RUN apt-get clean
# RUN if [ "${INSTALL_CUBEMX}" = "true" ]; then \ # RUN if [ "${INSTALL_CUBEMX}" = "true" ]; then \
# chmod +x /tmp/CubeMX/install-cubemx.sh && /tmp/CubeMX/install-cubemx.sh; \ # chmod +x /tmp/CubeMX/install-cubemx.sh && /tmp/CubeMX/install-cubemx.sh; \

View File

@@ -0,0 +1 @@
xpra start :100 --start=/home/vscode/STM32CubeMX/STM32CubeMX --no-daemon --bind-tcp=0.0.0.0:14500 --html=on

View File

@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
script_dir=$(dirname "$(readlink -f "$0")")
push=false push=false
# Process oprions # Process oprions
@@ -12,4 +13,10 @@ while getopts "pt:" opt; do
done done
docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubemx:$tag . docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubemx:$tag $script_dir/.
docker build -t nexus.springblast.de:8082/carly/docker-stm32/cubemx:latest $script_dir/.
if [ "$push" = true ]; then
docker push nexus.springblast.de:8082/carly/docker-stm32/cubemx:$tag
docker push nexus.springblast.de:8082/carly/docker-stm32/cubemx:latest
fi

22
build_and_publish.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
script_dir=$(dirname "$(readlink -f "$0")")
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
if [ "$push" = true ]; then
$script_dir/CubeClt/build_and_publish.sh -t $tag -p
$script_dir/CubeMx/build_and_publish.sh -t $tag -p
else
$script_dir/CubeClt/build_and_publish.sh -t $tag
$script_dir/CubeMx/build_and_publish.sh -t $tag
fi