使用 Docker
注意
在构建期间不可能在 Docker 容器和主机文件系统之间创建引用链接或硬链接。你可以做的下一个最好的事情是使用 BuildKit 缓存挂载在构建之间共享缓存。或者,你可以使用 podman,因为它可以在构建时挂载 Btrfs 卷。
¥It is impossible to create reflinks or hardlinks between a Docker container and the host filesystem during build time. The next best thing you can do is using BuildKit cache mount to share cache between builds. Alternatively, you may use podman because it can mount Btrfs volumes during build time.