added podman support; reference the docs

This commit is contained in:
augustin_s committed 2026-11-16 14:04:50 +01:00
1 parent 31dab3df70
commit b97570d8e7
2 files changed
+18 -3

No files matched your search

+4 -2
View File
@@ -1,13 +1,15 @@
# OpenCode example for ai.psi.ch # OpenCode example for ai.psi.ch
This is a slightly more fleshed-out version of the OpenCode example [here](https://ai.pages.psi.ch/user-guide/coding-agent/#3-configure-opencode), make sure to read the [documentation](https://ai.pages.psi.ch/user-guide/coding-agent).
## Requirements ## Requirements
- Bash - Bash
- Docker - Docker or Podman
## Setup ## Setup
Run `setup.sh` once to build the Docker image and create the `auth.json`. It will ask you to manually insert your key into the file. Run `setup.sh` once to build the Docker image and create the `auth.json`. It will ask you to manually insert [your key](https://ai.pages.psi.ch/user-guide/coding-agent/#2-generate-your-api-key) into the file.
## Usage ## Usage
+14 -1
View File
@@ -1,6 +1,19 @@
#!/bin/bash #!/bin/bash
docker build --pull -t opencode-sandbox $@ . set -euo pipefail
if command -v podman &> /dev/null; then
CONTAINER_ENGINE="podman"
elif command -v docker &> /dev/null; then
CONTAINER_ENGINE="docker"
else
echo "Error: Neither Podman nor Docker is installed." >&2
exit 1
fi
echo "Using $CONTAINER_ENGINE"
"$CONTAINER_ENGINE" build --pull -t opencode-sandbox $@ .
AUTH="opencode/auth.json" AUTH="opencode/auth.json"
if [ ! -e "$AUTH" ]; then if [ ! -e "$AUTH" ]; then