-
Notifications
You must be signed in to change notification settings - Fork 73
Description
I have a task which launches a container from an OCI image stored locally, rather than from a container registry. A prestart exec
task transfers the image into alloc/tmp/katc.tar
, and then the Podman task is configured like this:
config {
image = "oci-archive:alloc/tmp/katc.tar"
args = ["nc_rabbit.py"]
}
The task driver returns the following error from Podman:
rpc error: code = Unknown desc = failed to create image: oci-archive:alloc/tmp/katc.tar: invalid image reference oci-archive:alloc/tmp/katc.tar: lstat /alloc: no such file or directory
If I change the image path to use the alloc's absolute path on the Nomad client:
config {
image = "oci-archive:/opt/nomad/data/alloc/${NOMAD_ALLOC_ID}/alloc/tmp/katc.tar"
args = ["nc_rabbit.py"]
}
It then works.
Since the driver is just calling the Podman API, I'm assuming this is simply because Podman is interpreting the path as relative to its own working directory (which I'm guessing is just /
, from the error).
As a user, I was expecting the driver to accept a path relative to the alloc or task directory, like most other Nomad tasks do. Is it possible for the driver to provide Podman with the absolute path on its own?
I'm using rootful Podman, if that matters.