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:
24
CubeMx/Dockerfile
Normal file
24
CubeMx/Dockerfile
Normal 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
|
||||
22
CubeMx/Resources/CubeMX/install-cubemx.sh
Normal file
22
CubeMx/Resources/CubeMX/install-cubemx.sh
Normal 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
15
CubeMx/build_and_publish.sh
Executable 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 .
|
||||
Reference in New Issue
Block a user