Skip to main content
Troubleshoot container build failures and setup script issues.

Container build fails

Symptoms:
  • Build stops with errors
  • Network timeout errors
Verify you can reach required package repositories:
ping google.com
ping packages.osrfoundation.org
If packages.osrfoundation.org is unreachable, check your firewall settings or try again later.
Sometimes cached layers cause issues. Force a clean rebuild:
  • Press F1 in VS Code
  • Select “Dev Containers: Rebuild Container Without Cache”
This will download all packages fresh and may resolve intermittent build failures.
Insufficient disk space can cause build failures:
docker system df
# Clean if needed
docker system prune -a

Post-create script fails

Symptoms:
  • Container builds but setup incomplete
  • TurtleBot3 packages not found
If the post-create script fails, the TurtleBot3 repositories won’t be cloned and your workspace will be incomplete.
Solution:
1

Manually run setup script

cd /workspace/turtlebot3_ws
bash .devcontainer/post-create.sh
2

Check script permissions

chmod +x .devcontainer/post-create.sh
chmod +x .devcontainer/post-start.sh
3

Run with debugging (if needed)

bash -x .devcontainer/post-create.sh
This shows each command as it executes, helping identify where the failure occurs.

Network timeout during build

If you’re experiencing network timeouts when downloading packages:
  1. Check your internet connection stability
  2. Try building during off-peak hours when package repositories are less busy
  3. Configure a mirror if you’re in a region with slow access to default repositories
  4. Increase Docker’s network timeout in Docker Desktop settings

Build takes too long

The first build typically takes 10-15 minutes. If it’s taking significantly longer:
  • Check that Docker has adequate resources allocated (see Docker issues)
  • Ensure no antivirus software is scanning Docker files in real-time
  • Verify your disk isn’t nearly full
  • Close unnecessary applications to free up system resources

Build docs developers (and LLMs) love