This Docker image provides an environment for running openEMS with graphic using X11. openEMS is a free and open electromagnetic field solver using the FDTD method. Develop your Python code in the src directory to develop locally and execute inside a containerized environment.
Dockerfile: Defines the Docker image and its environment.Makefile: Provides commands to build and run the Docker container.src/: Contains the Python scriptSimple_Patch_Antenna.py.README.md: This file, containing project documentation.
- Base Image: Ubuntu 22.04
- Includes:
XQuartzfor GUI applications on macOS- Various dependencies and libraries for
openEMS
- Install
openEMSand related dependencies - Run GUI applications within Docker
- Access GUI applications using X11
- Develop locally and execute your script inside a containerized environment.
- Install XQuartz:
- Download and install XQuartz from XQuartz.org.
- Restart your macOS after installation to apply changes.
- Check DISPLAY Variable::
- open a terminal and run
It should output something like localhost:0 or localhost:0.0.echo $DISPLAY
- manually set DISPLAY
export DISPLAY=localhost:0
- Make sure
xhostis installed and configured properly to allow Docker containers to connect to the X server. Allow Connections:
xhost +localhost
xhost +127.0.0.1To build the Docker image, run the following command:
make buildTo run the Python script inside the Docker container, use:
make runTo remove dangling Docker containers, networks, and images, use:
make clean[1] openEMS installation.
[2] openEMS documentation.
[3] openEMS.
[4] XQuartz.org.