Issue
As briefly discussed in https://discuss.linuxcontainers.org/t/delay-in-mounting-files-in-oci/24972 a file created on a container using a file block, such as the following, is not created until after the container has started.
content = file("./users.conf)
target_path = "/etc/sftp/users.conf"
create_directories = true
}
If this file is mandatory for container boot, then booting fails.
Proposal
A possible solution would be to add an option to the file block to create the file early, for use by containers; or late, for use by VMs. If the provider can automatically detect whether it's building a container or VM, this could be automated and invisible to users?
@sergeypdev mentioned a similar issue in #91