Created
December 24, 2025 18:50
-
-
Save dleslie/de67e2e683d22b8bf8da1202b4016809 to your computer and use it in GitHub Desktop.
Run OpenCode in Docker with persistent local storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function opencode() { | |
| mkdir -p "$HOME/.config/opencode" | |
| mkdir -p "$HOME/.local/share/opencode" | |
| docker run -it --rm \ | |
| -v "$(pwd):/app" \ | |
| -v "$HOME/.config/opencode:/root/.config/opencode" \ | |
| -v "$HOME/.local/share/opencode:/root/.local/share/opencode" \ | |
| ghcr.io/sst/opencode | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment