added podman support; reference the docs
This commit is contained in:
1 parent
31dab3df70
commit
b97570d8e7
2 files changed
+18
-3
No files matched your search
@@ -1,13 +1,15 @@
|
||||
# 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
|
||||
|
||||
- Bash
|
||||
- Docker
|
||||
- Docker or Podman
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
#!/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"
|
||||
if [ ! -e "$AUTH" ]; then
|
||||
|
||||
Reference in new issue
Block a user