Update UDI to allow using fuse-overlay rather than VFS with podman/buildah
Is your enhancement related to a problem? Please describe
VFS is slow and building an image using Eclispe Che may take minutes when the same build takes seconds on a local machine.
Describe the solution you'd like
Configure docker/podman in the Universal Developer Image to use Fuse instead of VFS and test to build and image on OpenShift.
Additional context
It's recommended to use fuse-overlayfs rather than VFS when using podman/buildah/docker There was an initiative to use Fuse overlay by default
fuse-overlayfs-1.9-1.module+el8.6.0+15917+093ca6f8 exists in RHEL 8.6.
So we can install that, and then follow steps to configure podman:
https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#ensure-fuse-overlayfs-is-installed
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.
/remove-lifecycle stale
@l0rd Try this, it works.
Create a MachineConfig to enable containers to use /dev/fuse
cat << EOF | butane | oc apply -f -
variant: openshift
version: 4.13.0
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: nested-podman
storage:
files:
- path: /etc/crio/crio.conf.d/99-nested-podman
mode: 0644
overwrite: true
contents:
inline: |
[crio.runtime.workloads.nested-podman]
activation_annotation = "io.openshift.nested-podman"
allowed_annotations = [
"io.kubernetes.cri-o.Devices"
]
[crio.runtime]
allowed_devices=["/dev/fuse"]
EOF
Note: Use machineconfiguration.openshift.io/role: master on SNO
Next, create a Dev Spaces workspace with a Podman enabled image.
Edit the devfile and add this to the container that runs vscode:
attributes:
pod-overrides: {"metadata": {"annotations": {"io.kubernetes.cri-o.Devices":"/dev/fuse","io.openshift.nested-podman":""}}}
Restart the workspace from the local devfile.
Remove the vfs configuration if it has been set in ~/.config/containers/storage.conf
Then run a podman build
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.
/remove-lifecycle stale