opencode-container/docker-compose.yaml
Jeena b1f356c5f5 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.
2026-01-15 12:19:07 +09:00

28 lines
491 B
YAML

services:
opencode:
image: opencode-arch
build:
context: .
dockerfile: Dockerfile
args:
USERNAME: "${USER}"
UID: "${UID}"
GID: "${GID}"
user: "${UID}:${GID}"
working_dir: "${PWD}"
stdin_open: true
tty: true
environment:
UID: "${UID}"
GID: "${GID}"
volumes:
- "${CONTAINER_HOME}:/home/${USER}/"
- "${PWD}:${PWD}"
cap_drop:
- ALL
security_opt:
- no-new-privileges:true