Complete documentation for building and running devsforge on Docker with automated scripts.
Repository: https://github.com/iscar-ucm/devsforge
git clone https://github.com/iscar-ucm/devsforge.git
cd devsforge- Windows (Recommended):
.\run_devsforge_init.cmd - Windows (PowerShell):
powershell -ExecutionPolicy RemoteSigned -File run_devsforge.ps1 - Windows (CMD):
run_devsforge.bat - Linux/macOS:
bash run_devsforge.sh
http://localhost:8090/devsforge
π Note: The example code is located in the shared volume:
- Windows:
C:\devsforge\code- Linux:
~/devsforge/code(or/home/your-user/devsforge/code)- macOS:
~/devsforge/code(or/Users/your-user/devsforge/code)
- Requirements
- Installing Requirements
- Execution Files
- Script Usage
- Configuration
- Application Access
- Useful Commands
- Troubleshooting
- Project Structure
- CPU: Dual-core processor or higher
- RAM: 4 GB minimum (8 GB recommended)
- Disk Space: 10 GB minimum for the Docker image
- Docker Desktop (version 4.0 or higher)
- On Windows: Requires WSL 2 or Hyper-V
- On macOS: Apple Silicon or Intel
- On Linux: Docker Engine
- PowerShell 5.1 (for Windows with .ps1)
- CMD/MS-DOS (for Windows with .bat)
- Bash (for Linux/macOS with .sh)
- Go to https://www.docker.com/products/docker-desktop
- Download Docker Desktop for Windows
- Run the installer
- Restart your computer when prompted
winget install Docker.DockerDesktopdocker --version
docker run hello-world- Go to https://www.docker.com/products/docker-desktop
- Download based on your processor:
- Apple Silicon: ARM64 version
- Intel: x86_64 version
- Open the
.dmgfile and drag Docker to Applications
brew install docker
brew install --cask dockerdocker --version
docker run hello-world# Update package indexes
sudo apt-get update
# Install dependencies
sudo apt-get install -y ca-certificates curl gnupg lsb-release
# Add official Docker repository
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Install Docker
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# Add current user to docker group (optional, to avoid sudo)
sudo usermod -aG docker $USER
newgrp dockerdocker --version
docker run hello-worldThe project includes automated scripts for different platforms:
| File | Platform | Usage | Execution |
|---|---|---|---|
run_devsforge_init.cmd |
Windows | RECOMMENDED - Resolves policy errors automatically | .\run_devsforge_init.cmd |
run_devsforge.ps1 |
Windows (PowerShell) | Direct execution | .\run_devsforge.ps1 or powershell -ExecutionPolicy RemoteSigned -File run_devsforge.ps1 |
run_devsforge.bat |
Windows (CMD) | Alternative if PowerShell doesn't work | run_devsforge.bat |
run_devsforge.sh |
Linux/macOS (Bash) | Bash script | bash run_devsforge.sh |
devsforge/
βββ run_devsforge_init.cmd β Windows initializer (recommended)
βββ run_devsforge.ps1 β PowerShell script (Windows)
βββ run_devsforge.bat β CMD script (Windows)
βββ run_devsforge.sh β Bash script (Linux/macOS)
βββ docker/
β βββ Dockerfile
βββ app/
βββ assets/
βββ code/
βββ README.md
# 1. Open a normal terminal (NOT admin)
# 2. Navigate to the project folder
cd C:\path\to\project\devsforge
# 3. Run the initializer
.\run_devsforge_init.cmdBenefit: Automatically resolves the execution policy error. β
# 1. Open a normal terminal (NOT admin)
# 2. Navigate to the project folder
cd C:\path\to\project\devsforge
# 3. Run the script with adjusted policy
powershell -NoProfile -ExecutionPolicy RemoteSigned -File run_devsforge.ps1Note: If you still get policy errors, go to "Troubleshooting" β "Execution Policy Error"
- Press
Win + R - Type
cmdand press Enter - Or search for "CMD" in the Start menu
cd C:\path\to\project\devsforgerun_devsforge.batThe script runs all steps automatically and will display colors for easy reading.
- Linux: Press
Ctrl + Alt + T - macOS:
Cmd + Space, search for "Terminal"
cd ~/path/to/project/devsforgechmod +x run_devsforge.sh./run_devsforge.shOr if permissions weren't granted:
bash run_devsforge.shThe script automatically runs all required steps.
If you need to change the shared folder path, port, or container name, open the corresponding file and modify the variables at the beginning:
# βοΈ CONFIGURATION - Modify these variables as needed
$CONTAINER_NAME = "devsforge-container"
$IMAGE_NAME = "devsforge-apache"
$DOCKER_PORT = "8090" # Port on your machine
$HOST_PORT = "80" # Port in the container
$SHARED_FOLDER = "C:\devsforge\code" # β Change this path if needed
$CONTAINER_PATH = "/var/www/html/devsforge/code"REM βοΈ CONFIGURATION
set CONTAINER_NAME=devsforge-container
set IMAGE_NAME=devsforge-apache
set DOCKER_PORT=8090
set HOST_PORT=80
set SHARED_FOLDER=C:\devsforge\code REM β Change this path if needed
set CONTAINER_PATH=/var/www/html/devsforge/code# βοΈ CONFIGURATION
CONTAINER_NAME="devsforge-container"
IMAGE_NAME="devsforge-apache"
DOCKER_PORT="8090"
HOST_PORT="80"
SHARED_FOLDER="$HOME/devsforge/code" # β Change this path if needed
CONTAINER_PATH="/var/www/html/devsforge/code"Open the corresponding file and change:
$DOCKER_PORT = "3000"Then access: http://localhost:3000/devsforge
http://localhost:8090/devsforge
- Wait 30-60 seconds for the container to start completely
- Open your favorite browser
- Navigate to:
http://localhost:8090/devsforge
-
Verify that the container is running:
docker ps
-
Check the container logs:
docker logs devsforge-container -
Restart the container:
docker restart devsforge-container
docker ps # View active containers
docker ps -a # View all containers
docker ps -a --filter "name=devsforge" # Filter by namedocker logs devsforge-container # View all logs
docker logs -f devsforge-container # View logs in real time
docker logs -f --tail 100 devsforge-container # Last 100 linesdocker stop devsforge-container # Stop
docker start devsforge-container # Start
docker restart devsforge-container # Restart
docker pause devsforge-container # Pause
docker unpause devsforge-container # Resume# Delete container only
docker stop devsforge-container
docker rm devsforge-container
# Delete image
docker rmi devsforge-apache
# Clean everything (unused containers, images, volumes)
docker system prune -a --volumes# Enter the container terminal
docker exec -it devsforge-container bash
# Run commands in the container
docker exec devsforge-container php -v
docker exec devsforge-container python3 --version
docker exec devsforge-container java -versiondocker exec devsforge-container php -v # PHP
docker exec devsforge-container python3 --version # Python
docker exec devsforge-container java -version # Java
docker exec devsforge-container rustc --version # Rust
docker exec devsforge-container cargo --version # Cargo
docker exec devsforge-container pip list | grep xdevs # xdevs.py
docker exec devsforge-container ls -la /opt/xdevs.rs # xdevs.rs1. VERIFICATION
β Docker installed and accessible
β Project location identified
2. IMAGE BUILDING (5-10 minutes)
β Download Ubuntu 22.04
β Install Apache 2
β Install PHP + extensions
β Install Java
β Install Python 3
β Install Rust (rustup) and Cargo
β Install xdevs.py
β Install xdevs.rs
β Configure shared volume
3. FOLDER PREPARATION
β Delete old folder (if exists)
β Create new empty folder
4. CONTAINER STARTUP
β Run container in background
β Map port 8090 β 80
β Mount shared volume
5. FINAL VERIFICATION
β Verify container is running
β Display access information
Error:
Cannot load file [...] because script execution is disabled
Solutions (in recommended order):
.\run_devsforge_init.cmdThis runs PowerShell with the correct policy automatically.
powershell -NoProfile -ExecutionPolicy RemoteSigned -File run_devsforge.ps1- Open PowerShell as Administrator
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
- Type
Yor press Enter when asked for confirmation - Close PowerShell completely
- Open a new PowerShell window (without admin)
- Try again:
.\run_devsforge.ps1
Explanation:
Restricted: Doesn't allow running scripts (default policy)RemoteSigned: Allows running local scriptsCurrentUser: Only applies to your user, not the entire system-Force: Without confirmation
Solution:
- Download Docker Desktop from https://www.docker.com/products/docker-desktop
- Install and restart your computer
- Run the script again
Solution:
- Change the port in the script (e.g.: 3000, 5000, etc.)
- Or stop the previous container:
docker stop devsforge-container docker rm devsforge-container
Solution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserSolutions:
- Wait 60 seconds after running the script
- Verify Docker is running:
docker ps - Check logs:
docker logs devsforge-container - Try with:
http://localhost:8090(without/devsforge) - Restart the container:
docker restart devsforge-container
Solution:
# Verify the volume is mounted correctly
docker inspect devsforge-container | findstr -A 5 "Mounts"
# If it doesn't appear, delete and recreate the container
docker stop devsforge-container
docker rm devsforge-container
# Run the script againSolution:
- Open Docker Desktop (it must be running)
- Wait for it to completely initialize
- Run the script again
Solution:
- Verify the path in the script (variable
$SHARED_FOLDER) - Check folder permissions
- On Linux/macOS, make sure the folder exists:
mkdir -p $HOME/devsforge/code
The image includes:
- Operating System: Ubuntu 22.04 LTS
- Web Server: Apache 2.4 with mod_rewrite enabled
- PHP: Recent version with extensions:
- php-cli
- php-mbstring
- php-xml
- libapache2-mod-php
- Java: OpenJDK (default-jdk) + Maven
- xDEVS for Java: DEVS Framework for Java
- β
INCLUDED in the repository:
bin/xdevs.jar - Repository: https://github.com/iscar-ucm/xdevs
- The JAR is automatically copied during Docker build
- See
bin/README.mdfor more details
- β
INCLUDED in the repository:
- Python 3: With pip installed
- xdevs.py: DEVS Framework for Python from GitHub
- Rust: Latest stable version with Cargo (rustup)
- xdevs.rs: DEVS Framework for Rust cloned from GitHub (/opt/xdevs.rs)
- Build Tools: build-essential, pkg-config, libssl-dev
- Tools: git, curl, wget, unzip
- Time Zone: America/Lima
devsforge/
βββ README.md β You are here
βββ run_devsforge.ps1 β PowerShell script (Windows)
βββ run_devsforge.bat β CMD script (Windows)
βββ run_devsforge.sh β Bash script (Linux/macOS)
βββ config.php β Configuration
βββ errors.php β Error handling
βββ index.php β Entry point
β
βββ app/ β Application
β βββ help_about_modeling.php
β βββ help_about_simulation.php
β βββ modeling_structure.php
β βββ run_simulation.php
β βββ ...
β
βββ assets/ β Static resources
β βββ css/
β βββ img/
β βββ js/
β
βββ bin/ β Binaries (xdevs.jar)
β βββ README.md
β βββ fonts/
β
βββ code/ β SHARED VOLUME
β βββ Generator.java
β βββ generator.py
β βββ src/ β Rust files
β β βββ generator.rs
β β βββ processor.rs
β β βββ transducer.rs
β βββ processor.py
β βββ transducer.py
β βββ ...
β
βββ docker/ β Docker configuration
β βββ Dockerfile
β βββ Dockerfile.md
β
βββ layout/ β Layout
β βββ ...
β
βββ lib/ β Libraries
β βββ Router.php
β
βββ .gitignore β Git
βββ ...
# 1. Open PowerShell/CMD in the project folder
cd C:\path\to\project\devsforge
# 2. Run the script
.\run_devsforge.ps1
# 3. Wait 5-10 minutes (image building)
# 4. Wait 30-60 seconds more (container startup)
# 5. Open http://localhost:8090/devsforge# If you need to restart the container
docker restart devsforge-container
# If you need to see the logs
docker logs -f devsforge-container
# To stop
docker stop devsforge-container
# To start again
docker start devsforge-container- GitHub Repository: https://github.com/iscar-ucm/devsforge
- Issues: https://github.com/iscar-ucm/devsforge/issues
- Discussions: https://github.com/iscar-ucm/devsforge/discussions
- Docker: https://docs.docker.com/
- Docker Compose: https://docs.docker.com/compose/
- Apache: https://httpd.apache.org/docs/
- PHP: https://www.php.net/docs.php
- Docker Community: https://community.docker.com/
- Stack Overflow: https://stackoverflow.com/questions/tagged/docker
- Port 8090: The application uses port 8090 by default (configurable)
- First build: May take 5-10 minutes on the first run
- Synchronization: The
codefolder syncs in real-time with the container - Initial files: Are copied automatically on first run
- Docker must be running: Make sure Docker Desktop is active
- WSL 2 (Windows): WSL 2 is recommended over Hyper-V for better performance
- Permissions: On Linux/macOS, you may need execution permissions for the script
Before reporting issues, verify:
- Docker is installed:
docker --version - Docker is running (Docker Desktop open)
- Port 8090 is not in use:
netstat -ano | findstr :8090 - Project cloned/downloaded correctly
- Scripts have execution permissions (Linux/macOS)
- Sufficient disk space (10 GB minimum)
- Active internet connection (to download the image)
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-11-30 | Initial version with automated scripts |
Contributions are welcome. To contribute:
- Fork the repository: https://github.com/iscar-ucm/devsforge/fork
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For more details, visit the repository: https://github.com/iscar-ucm/devsforge
Last updated: November 30, 2025
To report issues or suggestions, visit: https://github.com/iscar-ucm/devsforge/issues