How to fix "FileNotFoundError: [Errno 2] No such file or directory: '/.prefect/storage'"?

This error may occur when running a container as a non-root user

You should be able to set either PREFECT_LOCAL_STORAGE_PATH or PREFECT_HOME as an environment variable to a path that this non-user has access to e.g. this may be set to the same directory as the WORKDIR in a Dockerfile

more on this approach:

Another possibility is to add an emptyDir volume and an init container in which you change permissions of the volume (example here). The manifest it applies to can be found here