We don't want to let people run more than one instance of opencode
in one project directory, this will lead to chaos and then
they interfear with each other in weird ways like when one
stopps it crashes the other, etc.
This is to fix the problem with docker creating those directories
to mount it inside of the container-home. This only happens when
the project path is inside of $HOME which is mounted to the
.local/share/opencode-container/cantainer-home
With it like this, the empty directories are owned by the local
user and not root and it's easier to clean up in the future.
Move from docker compose run to a Python-managed container lifecycle.
Each project now gets a dedicated container that is started on demand
and stopped when opencode exits, instead of being recreated each time.
Use a shared home directory across projects so configurations presist.
The container are not destroyed, so tools and caches can be installed
specifically for a project by opencode itself once and reused, while
still avoiding long-running containers.
The problem was that we mounted `pwd` as HOME and that meant that
every time git was used it would look into the data and work for a
long time, and it would also commit everything there.
Now we have a central container-home directory in the directory
where we checked out this git repo and it is used by each session
independent of in which project directory we are.
It was impossible to have several arguments while calling
opencode in the container like `opencode auth list`, it would
just break. With this change this also works.