Interprets a pulled OCI image config against a Tank.Container spec to derive
the workload's run parameters, per the OCI rules:
- argv — the spec's
commandoverrides the imageEntrypoint, andargsoverridesCmd. As in Docker, settingcommandresetsCmd: withcommandgiven, argv iscommand ++ args(the imageCmdis dropped); otherwise argv isEntrypoint ++ (args || Cmd). - env = the image
Env, with the spec'senvmerged over it. - cwd =
working_dir || image WorkingDir || "/".
The image config is the raw parsed OCI config map (config["config"] holds
the runtime fields), as returned by Tank.Image.pull/2.
Summary
Functions
Derive %{argv:, env:, cwd:} for container from image_config. Returns
{:error, :no_command} if neither the spec nor the image provides a command.
Types
Functions
@spec run_params(Tank.Container.t(), map()) :: {:ok, run_params()} | {:error, :no_command}
Derive %{argv:, env:, cwd:} for container from image_config. Returns
{:error, :no_command} if neither the spec nor the image provides a command.