cri: Don't use rel path for image volumes

Runc 1.1 throws a warning when using rel destination paths, and runc 1.2
is planning to thow an error (i.e. won't start the container).

Let's just make this an abs path in the only place it might not be: the
mounts created due to `VOLUME` directives in the Dockerfile.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
Rodrigo Campos
2023-07-26 18:20:22 +02:00
parent 81895d22c9
commit 2d64ab8d79
4 changed files with 43 additions and 9 deletions

View File

@@ -93,7 +93,7 @@ func TestVolumeCopyUp(t *testing.T) {
},
},
{
containerPath: "C:/weird_test_dir",
containerPath: "/C:/weird_test_dir",
files: []volumeFile{
{
fileName: "weird_test_file",