Build-context uploads for declarative image builds.
When an ExDaytona.Image includes local files (add_local_file/3,
add_local_dir/3), the files are packaged as tars and pushed to
Daytona's S3-compatible object storage before the build; the build
references them by content hash (contextHashes). This module
implements that flow — ExDaytona.Sandbox.create/2 calls it
automatically, so it is rarely used directly.
The upload speaks S3 (SigV4) via the SDK's own HTTP stack — no AWS dependency.
Summary
Functions
The archive path for a local path: normalized, without the leading
separator — used as the tar entry name, the content-hash salt, and the
COPY source in the generated Dockerfile.
Temporary push credentials for the organization's build-context storage, as a snake_case map.
Upload one build context (a file or directory) and return its hash.
Like upload_context/3 but reuses already-fetched push credentials —
used to upload several contexts under one credential grant.
Functions
The archive path for a local path: normalized, without the leading
separator — used as the tar entry name, the content-hash salt, and the
COPY source in the generated Dockerfile.
@spec push_access(ExDaytona.Client.t()) :: {:ok, ExDaytona.ObjectStorage.Access.t()} | {:error, ExDaytona.Error.t()}
Temporary push credentials for the organization's build-context storage, as a snake_case map.
@spec upload_context(ExDaytona.Client.t(), Path.t(), keyword()) :: {:ok, String.t()} | {:error, ExDaytona.Error.t()}
Upload one build context (a file or directory) and return its hash.
Skips the upload when an object with the same content hash already
exists. archive_path defaults to archive_base_path(source_path).
@spec upload_context_with_access(map(), Path.t(), keyword()) :: {:ok, String.t()} | {:error, ExDaytona.Error.t()}
Like upload_context/3 but reuses already-fetched push credentials —
used to upload several contexts under one credential grant.