STM32CubeMX Setup and Docker Environment for STM32 Projects
To use the thunderatz/stm32cubemx
image in another container, you can pull it directly from the GitHub Container Registry (GHCR) or Docker Hub.
If you're using Docker Hub, use the following command:
docker pull thunderatz/stm32cubemx:6.13.0
If you're using GHCR, the command will be:
docker pull ghcr.io/thunderatz/stm32cubemx:6.13.0
After pulling the image, you can run it in a container with the following command. Make sure to adjust the volume according to your project:
docker run --rm -it \
-v /path/to/your/project:/workspace \
thunderatz/stm32cubemx:6.13.0
Or, if you're using GHCR:
docker run --rm -it \
-v /path/to/your/project:/workspace \
ghcr.io/thunderatz/stm32cubemx:6.13.0
This project uses Docker to containerize the STM32CubeMX environment, making setup and development easier. Follow these steps to set up your environment:
Make sure Docker is installed on your machine. To build the Docker image, run the following command in the project's root directory:
docker build -t stm32cubemx -f .
This will download and install all necessary dependencies, including STM32CubeMX and Java Runtime.
Once the image is built, you can run STM32CubeMX inside the Docker container. To do this, execute the following command:
docker run -it --rm stm32cubemx
This will launch the STM32CubeMX environment inside the Docker container, allowing you to work on your STM32 project.
The Dockerfile provided in this repository creates a containerized environment for STM32CubeMX. It includes all the necessary dependencies to run STM32CubeMX on an Ubuntu system. Here's a summary of how the Dockerfile works:
- Base Image: The Dockerfile starts from the official Ubuntu 24.04 image.
- Dependencies: It installs essential packages such as
unzip
,xvfb
,wget
,openjdk-21-jre
, and others required to run STM32CubeMX. - STM32CubeMX: It downloads and sets up STM32CubeMX, along with the Java Runtime.
- X11 Virtual Frame Buffer (Xvfb): A virtual X server is used to run the GUI-based STM32CubeMX in headless mode.
We welcome contributions! To contribute to the ThundeRatz/stm32cubemx
project, please follow these guidelines:
-
Fork the repository – Start by forking this repository to your own GitHub account.
-
Create a new branch – When creating a new branch for your changes, please name the branch according to the version of STM32CubeMX you are working with. For example:
v6.13.1
for version 6.13.1 of STM32CubeMXv6.14.0
for version 6.14.0 of STM32CubeMX
-
Make your changes – Implement the desired changes or fixes in your branch.
-
Test your changes – Ensure everything works as expected within the container. Build and verify the setup for STM32CubeMX.
-
Submit a pull request – Once your changes are ready, submit a pull request (PR) with a detailed description of the modifications.
We appreciate all contributions, whether it's reporting issues, suggesting features, or submitting fixes!
Thanks goes to these wonderful people:
Eduardo Barreto 💻 📖 🔬 👀 |
Gabriel Cosme Barbosa 💻 🔬 👀 |
This project follows the all-contributors specification. Contributions of all kinds are welcome!