Created
September 29, 2025 13:32
-
-
Save sgarcez/4632770a4e33c94e2ac1810b0ed59758 to your computer and use it in GitHub Desktop.
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
| FROM node:18-slim AS base | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| git \ | |
| openssh-client \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN npm install -g @anthropic-ai/claude-code | |
| WORKDIR /workspace | |
| FROM base AS claude-runner | |
| ARG CLAUDE_PROMPT | |
| COPY --from=remotesource . . | |
| RUN --mount=type=secret,id=anthropic_key \ | |
| export ANTHROPIC_API_KEY="$(cat /run/secrets/anthropic_key)" && \ | |
| echo "Executing Claude with prompt: $CLAUDE_PROMPT" && \ | |
| claude -p "$CLAUDE_PROMPT" 2>&1 | tee output.txt || echo "Claude execution failed" | |
| FROM scratch AS output | |
| COPY --from=claude-runner /workspace/output.txt /output.txt |
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
| #!/bin/sh | |
| docker build \ | |
| --builder cloud-docker-default \ | |
| --secret id=anthropic_key,src=/var/anthropic/api_key \ | |
| --build-arg CLAUDE_PROMPT="summarize the readme file" \ | |
| -f Dockerfile.claude-code \ | |
| --progress plain \ | |
| --target output \ | |
| --output . \ | |
| --build-context [email protected]:docker/compose.git \ | |
| --ssh default=$SSH_AUTH_SOCK \ | |
| . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment