mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
chore(docker): improve base image and organize docker files
- Add wget, ripgrep, python3, and GitHub CLI (gh) to base image - Add OPENCODE_ALLOW_ALL_MODELS=true to production ENV - Move compose files, onboard-smoke Dockerfile to docker/ - Move entrypoint script to scripts/docker-entrypoint.sh - Add Podman Quadlet unit files (pod, app, db containers) - Add docker/README.md with build, compose, and quadlet docs - Add scripts/docker-build-test.sh for local build validation - Update all doc references for new file locations - Keep main Dockerfile at project root (no .dockerignore changes needed) Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
ebc6888e7d
commit
420cd4fd8d
15 changed files with 249 additions and 27 deletions
46
scripts/docker-build-test.sh
Executable file
46
scripts/docker-build-test.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
# Verify the Docker image builds successfully.
|
||||
# Skips gracefully when docker/podman is not available.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
# Detect container runtime
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
RUNTIME=docker
|
||||
elif command -v podman >/dev/null 2>&1; then
|
||||
RUNTIME=podman
|
||||
else
|
||||
echo "SKIP: neither docker nor podman found — skipping build test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Verify the daemon is reachable (docker may be installed but not running)
|
||||
if ! "$RUNTIME" info >/dev/null 2>&1; then
|
||||
echo "SKIP: $RUNTIME is installed but not running — skipping build test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
IMAGE_TAG="paperclip-build-test:$$"
|
||||
trap '"$RUNTIME" rmi "$IMAGE_TAG" >/dev/null 2>&1 || true' EXIT
|
||||
|
||||
echo "==> Testing Docker build with $RUNTIME"
|
||||
"$RUNTIME" build \
|
||||
-f "$REPO_ROOT/Dockerfile" \
|
||||
-t "$IMAGE_TAG" \
|
||||
--target production \
|
||||
"$REPO_ROOT"
|
||||
|
||||
echo "==> Verifying key binaries in image"
|
||||
"$RUNTIME" run --rm "$IMAGE_TAG" sh -c '
|
||||
set -e
|
||||
node --version
|
||||
git --version
|
||||
gh --version
|
||||
rg --version
|
||||
python3 --version
|
||||
curl --version | head -1
|
||||
claude --version 2>/dev/null || echo "claude CLI not found (OK in minimal builds)"
|
||||
'
|
||||
|
||||
echo "PASS: Docker build test succeeded"
|
||||
Loading…
Add table
Add a link
Reference in a new issue