mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-08 11:56:59 +00:00
Docker compose: mount docker.sock + install Docker CLI so Cookbook can reach sibling containers
Cookbook now needs to docker-exec into ollama-rocm (and any other sibling container holding a model server) from inside its own container, so: - Dockerfile installs the Docker CLI from the static binary tarball (the Debian docker.io package ships dockerd but not the client on slim) - docker-compose.yml bind-mounts /var/run/docker.sock and adds group_add for the host docker group (default GID 963) - entrypoint.sh detects the socket GID, creates a local group with that GID, and runs usermod -aG before gosu-dropping to the app user so the supplementary group propagates through (gosu strips by default)
This commit is contained in:
@@ -16,6 +16,16 @@ services:
|
||||
# land under /app/.local for the odysseus user. Persist them so a
|
||||
# container recreate does not silently remove installed serve engines.
|
||||
- ${APP_DATA_DIR:-./data}/local:/app/.local:z
|
||||
# Docker socket — lets Cookbook launch commands like
|
||||
# `docker exec ollama-rocm ollama show <tag>` reach the host's
|
||||
# Docker daemon (and sibling containers like ollama-rocm /
|
||||
# ollama-test). The in-container user needs to be in the
|
||||
# socket's owning group — see `group_add` below; the GID
|
||||
# there must match the host's `docker` group (defaults to 963
|
||||
# on Debian, 999 on Ubuntu — override via env if yours differs).
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
group_add:
|
||||
- "${DOCKER_GID:-963}"
|
||||
extra_hosts:
|
||||
# Lets the container reach local services on the Docker host, including
|
||||
# Ollama at http://host.docker.internal:11434.
|
||||
|
||||
Reference in New Issue
Block a user