- Mount host workspace at /home/ga/workspace - Add SSH key and known_hosts for Gitea auth - Configure git user identity in container
27 lines
729 B
YAML
27 lines
729 B
YAML
services:
|
|
opencode:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: opencode-sandbox
|
|
container_name: opencode
|
|
cap_add:
|
|
- NET_ADMIN # required for iptables in entrypoint
|
|
- NET_RAW
|
|
volumes:
|
|
# Your monorepo — opencode's working directory
|
|
- /home/ga/workspace:/workspace
|
|
# SSH key for Gitea auth
|
|
- ~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
|
|
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro
|
|
# Persist opencode auth so you don't re-login every time
|
|
- opencode-auth:/root/.local/share/opencode
|
|
environment:
|
|
- OPENCODE_API_KEY=${OPENCODE_API_KEY}
|
|
stdin_open: true
|
|
tty: true
|
|
working_dir: /workspace
|
|
|
|
volumes:
|
|
opencode-auth:
|