From e6a2e27998339a6e055913af91eff88b5f1d7562 Mon Sep 17 00:00:00 2001 From: Oz Date: Sun, 2 Aug 2026 06:57:06 +0000 Subject: [PATCH] Add oz-local dev tools to the agent-dev image Adds Docker CLI/daemon, Postgres (+pgvector), Redis, a JRE + the GCP Pub/Sub emulator, and small process-compose/watchexec/temporal binaries, so agents working in this repo can run and test warp-server's oz-local stack (both the direct and docker worker backends) without reinstalling everything from scratch each session. Also adds --batch --yes to the existing gcloud apt-key gpg --dearmor call: the classic (non-buildx) docker build otherwise fails trying to open /dev/tty for the dearmor step in some sandboxed environments. Measured with docker image inspect --format '{{.Size}}': - baseline: 1,623,166,023 bytes (~1.62 GB) - with new tools: 2,120,106,119 bytes (~2.12 GB) - delta: ~497 MB (~31% larger) Verified all new tools resolve and run in a built container: docker, psql/pg_ctlcluster, redis-server, java, the pubsub emulator package, jq, process-compose, watchexec, and temporal. Co-Authored-By: Oz --- docker/agent-dev/Dockerfile | 44 ++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/docker/agent-dev/Dockerfile b/docker/agent-dev/Dockerfile index 27d4311bc33..b44824a6710 100644 --- a/docker/agent-dev/Dockerfile +++ b/docker/agent-dev/Dockerfile @@ -88,7 +88,7 @@ RUN cd ./setup && ./script/linux/install_test_deps RUN set -eux; \ install -d -m 0755 /usr/share/keyrings; \ curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg \ - | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg; \ + | gpg --batch --yes --dearmor -o /usr/share/keyrings/cloud.google.gpg; \ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \ > /etc/apt/sources.list.d/google-cloud-sdk.list; \ apt-get update; \ @@ -107,6 +107,48 @@ RUN set -eux; \ tfenv use 1.15.5; \ terraform version +# Tools needed to run and test the oz-local local development stack +# (warp-server/script/oz-local): a local Postgres + Redis backing store, the +# Docker CLI/daemon for the docker worker backend, a JRE for the GCP Pub/Sub +# emulator, and small Go/Rust binaries used by the stack's process supervisor +# and dev hot-reload. +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + docker.io \ + postgresql postgresql-contrib postgresql-16-pgvector \ + redis-server \ + openjdk-17-jre-headless google-cloud-cli-pubsub-emulator \ + jq; \ + rm -rf /var/lib/apt/lists/* + +# process-compose: supervises the oz-local stack's processes. +RUN set -eux; \ + curl -fsSL https://raw.githubusercontent.com/F1bonacc1/process-compose/main/scripts/get-pc.sh \ + | sh -s -- -d -b /usr/local/bin; \ + process-compose version + +# watchexec: powers warp-server's script/server hot-reload. +RUN set -eux; \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64) WATCHEXEC_ARCH=x86_64-unknown-linux-gnu ;; \ + arm64) WATCHEXEC_ARCH=aarch64-unknown-linux-gnu ;; \ + esac; \ + curl -fsSL "https://github.com/watchexec/watchexec/releases/download/v2.3.2/watchexec-2.3.2-$WATCHEXEC_ARCH.tar.xz" -o /tmp/watchexec.tar.xz; \ + mkdir -p /tmp/watchexec-extract; \ + tar -xJf /tmp/watchexec.tar.xz -C /tmp/watchexec-extract; \ + cp "$(find /tmp/watchexec-extract -name watchexec -type f | head -1)" /usr/local/bin/watchexec; \ + chmod +x /usr/local/bin/watchexec; \ + rm -rf /tmp/watchexec.tar.xz /tmp/watchexec-extract; \ + watchexec --version + +# Temporal CLI: runs oz-local's local Temporal dev server for agent dispatch. +RUN set -eux; \ + curl -sSf https://temporal.download/cli.sh | sh; \ + ln -s /root/.temporalio/bin/temporal /usr/local/bin/temporal; \ + temporal --version + # Coding Agent CLIs (optional, makes image significantly larger) ARG INSTALL_CODING_AGENTS=false RUN if [ "$INSTALL_CODING_AGENTS" = "true" ]; then \