From b686c3673e28d6be9a8627d30f407f37f3c408be Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Tue, 31 Mar 2026 22:12:21 -0700 Subject: [PATCH] chore: add script for building CI image locally --- scripts/build-ci-image.sh | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 scripts/build-ci-image.sh diff --git a/scripts/build-ci-image.sh b/scripts/build-ci-image.sh new file mode 100755 index 0000000..8353fb8 --- /dev/null +++ b/scripts/build-ci-image.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Build and test the CI runner image locally + +set -e + +IMAGE_NAME="euchre-camp-ci" +TAG="${1:-latest}" + +echo "Building CI runner image..." +echo "Image: ${IMAGE_NAME}:${TAG}" +echo "" + +# Build the image +docker build \ + -f Dockerfile.ci \ + -t ${IMAGE_NAME}:${TAG} \ + . + +echo "" +echo "✅ Image built successfully!" +echo "" + +# Test the image +echo "Testing CI image..." +docker run --rm ${IMAGE_NAME}:${TAG} sh -c " + echo 'Node.js version:' && node --version + echo 'npm version:' && npm --version + echo 'Git version:' && git --version + echo 'Prisma version:' && npx prisma --version + echo '' + echo 'Installed packages (top 10):' + npm list --depth=0 | head -10 +" + +echo "" +echo "✅ CI image is ready to use!" +echo "" +echo "To use in GitHub Actions/Gitea Actions:" +echo " container:" +echo " image: ${IMAGE_NAME}:${TAG}" +echo "" +echo "To push to registry:" +echo " docker tag ${IMAGE_NAME}:${TAG} registry.example.com/${IMAGE_NAME}:${TAG}" +echo " docker push registry.example.com/${IMAGE_NAME}:${TAG}"