Use podman instead of rkt, for extracting toolbox
Need to create and mount a dummy container, to get at image. Used rsync instead of cp -pR, easier with sudo permissions.pull/3946/head
parent
702d471308
commit
3d483b292c
|
@ -50,9 +50,13 @@ if [ ! -f "${osrelease}" ] || systemctl is-failed -q "${machinename}" ; then
|
||||||
sudo chown "${USER}:" "${machinepath}"
|
sudo chown "${USER}:" "${machinepath}"
|
||||||
|
|
||||||
if [[ -n "${have_docker_image}" ]]; then
|
if [[ -n "${have_docker_image}" ]]; then
|
||||||
riid=$(sudo --preserve-env rkt --insecure-options=image fetch "docker://${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}")
|
piid=$(sudo --preserve-env podman pull "docker://${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}")
|
||||||
sudo --preserve-env rkt image extract --overwrite --rootfs-only "${riid}" "${machinepath}"
|
pcid=$(sudo --preserve-env podman create "${piid}")
|
||||||
sudo --preserve-env rkt image rm "${riid}"
|
mnt=$(sudo --preserve-env podman mount "${pcid}")
|
||||||
|
sudo --preserve-env rsync -ax "${mnt}"/ "${machinepath}"/
|
||||||
|
sudo --preserve-env podman unmount "${pcid}"
|
||||||
|
sudo --preserve-env podman rm "${pcid}"
|
||||||
|
sudo --preserve-env podman rmi "${piid}"
|
||||||
else
|
else
|
||||||
echo "Error: No toolbox filesystem specified." >&2
|
echo "Error: No toolbox filesystem specified." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue