Docker image with skopeo not using specified tmp dir

11 views
Skip to first unread message

sebastiaan...@gmail.com

unread,
Dec 21, 2022, 11:46:12 AM12/21/22
to kiwi
Hi Marcus,

I came across a small bug while building a Docker image with Kiwi NG 9.24.55.

I'm using the --temp-dir parameter with kiwi-ng, however the call to skopeo does not takes this into account.

The problem is within umoci.py. I have made some slight code adjustments to get it working for export_container_image():
        Command.run([
            'skopeo', 'copy', 'oci:{0}'.format(self.working_image),
            '{0}:{1}:{2}'.format(transport, filename, image_ref),
            '--tmpdir', Defaults.get_temp_location()
        ] + extra_tags_opt)

and import_container_image():

        Command.run([
            'skopeo', 'copy', container_image_ref, 'oci:{0}:{1}'.format(
                self.container_dir, Defaults.get_container_base_image_tag()
            ), '--tmpdir', Defaults.get_temp_location()
        ])

Kind regards,

Sebastiaan

Marcus Schäfer

unread,
Jan 2, 2023, 6:37:46 AM1/2/23
to kiwi-...@googlegroups.com
Hi Sebastian

> I'm using the --temp-dir parameter with kiwi-ng, however the call to
> skopeo does not takes this into account.

Thanks for digging into this. I turned your findings into a pull
request here:

https://github.com/OSInside/kiwi/pull/2226

Would be great if you can take a look at it if it makes sense.

One problem though: I was not able to find a --tmpdir option in
the skopeo I'm using (skopeo version 0.1.41). Am I just blind or
was this added later to skopeo and we need to check on the version ?

Thanks

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer Brunnenweg 18
Tel: +49 7562 905437 D-88260 Argenbühl
Germany
-------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages