The script kas-container is essentially a wrapper that runs kas inside a container on your local machine. This is useful if you want to reproduce the build on different hosts. It provides isolation, a deterministic build environment, and prevents contamination of the host system. At the end of the day, it runs kas just like you would on your host.
On the other hand, kas runs directly on your machine. In this case, you need to ensure that all required tools and configurations are installed correctly, and there is a risk of affecting your host system if something goes wrong.
It might seem that kas-container is always the better option, but that is not necessarily true. For example, in a CI/CD environment where the runner itself is already inside a container (like Docker), using kas-container introduces the “Docker-in-Docker” problem. In such cases, it is better to use plain kas.