Skip to content

Volumes

Endor isolates the sandbox filesystem from the host for security and privacy reasons.

Sandboxes can get directories exposed from the host filesystem, so that they can act on certain data.

Mount volumes

Allow Host Filesystem Access

  1. 1

    Start any service with the --volume flag. It has the form of <hostPath>:<sandboxPath>:

    Terminal window
    endor run alpine --volume .:/app
  2. 2

    Verify access to the filesystem:

    ๐Ÿš€ Endor
    Launching the Alpine environment
    โœ… Mission ready
    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    โ”‚ Volumes: โ”‚
    โ”‚ - /home/<user>/my-project (host) -> /app (guest) โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
    โœ… Connection established โ€ข Ready in 1.9s
    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    โ”‚ Alpine Connection Details โ”‚
    โ”‚ โ”‚
    โ”‚ Host: 127.0.0.1 โ”‚
    โ”‚ Ports: โ”‚
    โ”‚ - 2222 (host) <-> 2222 (guest) โ”‚
    โ”‚ Public network access: restricted โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  3. 3

    Test filesystem access from within the sandbox:

    Terminal window
    # Inside the sandbox
    ls -la /app

You can mount many volumes in the same invocation, if you have the need to expose multiple directories inside the sandbox.

Common Use Cases

Mount volumes when you need to:

  • Populate services: you can populate database instances with existing SQL files in your host filesystem.
  • Access files in your host filesystem: reading files from your host filesystem enables you to pick what information is exposed to the sandbox.