This guide is for advanced users who want to use their own forked repository or custom Docker images with MDS SITL.
⚠️ Prerequisites Required:
- Good understanding of Git, Docker, and Linux
- Experience with environment variables and bash commands
- Ability to maintain forked repositories
⚠️ Important Warning: Using custom repositories disconnects you from automatic MDS updates. You’ll need to manually sync your fork with upstream changes.
Copy and paste these commands, replacing with your repository details:
# Set your custom repository configuration
export MDS_REPO_URL="git@github.com:YOURORG/YOURREPO.git"
export MDS_BRANCH="your-branch-name"
export MDS_DOCKER_IMAGE="your-custom-image:latest"
# Save to file for future use (optional)
cat > ~/.mds_config << EOF
export MDS_REPO_URL="git@github.com:YOURORG/YOURREPO.git"
export MDS_BRANCH="your-branch-name"
export MDS_DOCKER_IMAGE="your-custom-image:latest"
EOF
# If you need a custom Docker image with your repository:
cd /path/to/mavsdk_drone_show
bash tools/build_custom_image.sh
# Load your configuration (if saved to file)
source ~/.mds_config
# Deploy drones with your custom configuration
bash multiple_sitl/create_dockers.sh 5
# Start dashboard
bash app/linux_dashboard_start.sh --sitl
If you don’t want to set up SSH keys:
# Use HTTPS URL instead
export MDS_REPO_URL="https://github.com/YOURORG/YOURREPO.git"
export MDS_BRANCH="your-branch-name"
# Deploy
bash multiple_sitl/create_dockers.sh 5
Some scripts support direct arguments:
# Dashboard with custom branch
bash app/linux_dashboard_start.sh --sitl -b your-branch-name
# Build custom image with arguments
bash tools/build_custom_image.sh "git@github.com:YOURORG/YOURREPO.git" "your-branch"
export MDS_REPO_URL="git@github.com:mycompany/mds-fork.git"
export MDS_BRANCH="production"
export MDS_DOCKER_IMAGE="mycompany-drone:v1.0"
bash tools/build_custom_image.sh
bash multiple_sitl/create_dockers.sh 10
export MDS_REPO_URL="git@github.com:myusername/mds-dev.git"
export MDS_BRANCH="feature-branch"
bash multiple_sitl/create_dockers.sh 3
# Development
export MDS_REPO_URL="git@github.com:company/mds.git"
export MDS_BRANCH="develop"
bash multiple_sitl/create_dockers.sh 2
# Production
export MDS_REPO_URL="git@github.com:company/mds.git"
export MDS_BRANCH="production"
bash multiple_sitl/create_dockers.sh 20
Most scripts have help:
bash tools/build_custom_image.sh --help
bash multiple_sitl/create_dockers.sh --help
bash app/linux_dashboard_start.sh --help
# Check what will be used
echo "Repository: $MDS_REPO_URL"
echo "Branch: $MDS_BRANCH"
echo "Docker Image: $MDS_DOCKER_IMAGE"
# Test repository access
git ls-remote "$MDS_REPO_URL"
# See running containers
docker ps
# Check container repository
docker exec drone-1 bash -c "cd /root/mavsdk_drone_show && git remote -v"
Solution: Use HTTPS instead:
export MDS_REPO_URL="https://github.com/YOURORG/YOURREPO.git"
Solution: Build the image first:
bash tools/build_custom_image.sh
Solution: Check environment variables are set:
echo $MDS_REPO_URL
echo $MDS_BRANCH
⚠️ IMPORTANT: This section is ONLY for creating custom Docker images. For actual SITL drone operations, always use bash multiple_sitl/create_dockers.sh which handles hwid generation and proper drone setup.
For advanced users who want to develop inside containers and maintain custom images:
# Create a template container directly (avoid create_dockers.sh to prevent hwid generation)
sudo docker run -it --name my-drone-dev drone-template:latest /bin/bash
# Inside container - make your changes:
cd /root/mavsdk_drone_show
# Update to your repository if needed
git remote set-url origin git@github.com:YOURORG/YOURREPO.git
git pull origin your-branch
# Edit files, test changes, debug issues
# Install new packages, modify configuration
# Make any customizations you need
# Exit the container first
exit
# Commit container to new image version
docker commit -m "Updated custom drone image" my-drone-dev drone-template:v3.1
# Tag as latest (optional)
docker tag drone-template:v3.1 drone-template:latest
# Export to tar file for backup/distribution
docker save -o ~/drone-template_v3.tar drone-template:v3.1
# Or compress with 7z for smaller size
docker save drone-template:v3.1 | 7z a -si ~/drone-template_v3.7z
# Set your custom image for future SITL deployments
export MDS_DOCKER_IMAGE="drone-template:v3.1"
# NOW use create_dockers.sh for actual SITL drone operations
# (This will properly generate hwid and configure each drone)
bash multiple_sitl/create_dockers.sh 5
# Start your development container again (for image updates only)
sudo docker run -it --name my-drone-dev-v2 drone-template:latest /bin/bash
# Make updates inside container
cd /root/mavsdk_drone_show
git pull
# Exit and commit new version
exit
docker commit -m "Updated to latest version" my-drone-dev-v2 drone-template:v3.2
docker tag drone-template:v3.2 drone-template:latest
# Clean up old containers
docker rm my-drone-dev my-drone-dev-v2
💡 Pro Tip: This workflow is for customizing Docker images only. For actual SITL drone operations, always use
bash multiple_sitl/create_dockers.shwhich handles proper drone setup, hwid generation, and network configuration.
The basic SITL demo is designed for evaluation and learning. For production deployments, custom features, or hardware implementation, professional support is available:
Services Available:
Contact for Professional Implementation:
🏢 Note for Companies: Real-world drone deployments require aviation compliance, safety protocols, and specialized expertise. Contact us for professional consultation and implementation contracts.
For help with advanced configuration:
Back to: Main SITL Guide