Skip to content

Conversation

kundeng
Copy link

@kundeng kundeng commented Aug 11, 2025

Summary

  • Fixes JSR import failures in Harbor routines on Linux systems
  • Adds --network=host to Docker run command in run_routine() function
  • Resolves "JSR package manifest failed to load" errors when running harbor ls

Root Cause

Harbor runs TypeScript routines in containerized Deno environment. On Linux systems, Docker's default bridge networking prevents containers from accessing external registries like JSR (jsr.io), causing dependency downloads to fail.

This issue didn't occur on Mac due to Docker Desktop's more permissive networking compared to Docker Engine on Linux.

Solution

Added --network=host flag to the Docker run command in the run_routine() function (harbor.sh:350). This allows short-lived utility containers to access external registries while maintaining the existing security model.

Test Plan

  • Verified harbor ls works after clearing Deno cache
  • Confirmed JSR dependencies download successfully
  • Tested with fresh installation (removed harbor-deno-cache volume)
  • Verified no impact on existing Docker networking for other commands

🤖 Generated with Claude Code

Harbor routines run in containerized Deno environment but couldn't access
JSR registry for downloading dependencies like @std/yaml. This caused
'harbor ls' and other commands to fail on Linux systems.

The fix adds --network=host to the Docker run command in run_routine(),
allowing containers to access external registries while maintaining
the same security model (short-lived utility containers with existing
filesystem access).

Fixes network connectivity issues when downloading JSR packages on
Linux systems where Docker's default bridge networking is more restrictive.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant