Fix problem where container home was seperate for each project dir
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.
This commit is contained in:
parent
f479a613a0
commit
b1f356c5f5
6 changed files with 27 additions and 21 deletions
|
|
@ -7,10 +7,11 @@ opencode() {
|
|||
UID="$uid" \
|
||||
GID="$gid" \
|
||||
USER="$user" \
|
||||
CONTAINER_HOME="$OPENCODE_CONTAINER_DIR/container-home" \
|
||||
docker compose \
|
||||
-f "$OPENCODE_CONTAINER_DIR/docker-compose.yaml" \
|
||||
run --rm \
|
||||
-u "$uid:$gid" \
|
||||
opencode /home/"$user"/.opencode/bin/opencode "$@" \
|
||||
opencode opencode "$@" \
|
||||
2> >(grep -v "No services to build" >&2)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue