File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ while [[ $# -gt 0 ]]; do
2323 --init-script FILE Execute initialization script
2424 --apk-packages LIST Install additional Alpine packages (comma or space separated)
2525 --podman-arg ARG Pass additional argument to podman
26+ --version Show the Claude Code version in the image
2627 --help Display this help message
2728 EOT
2829 exit 0
@@ -52,6 +53,15 @@ while [[ $# -gt 0 ]]; do
5253 PODMAN_ARGS=" $PODMAN_ARGS $2 "
5354 shift 2
5455 ;;
56+ --version)
57+ podman run \
58+ --rm \
59+ --user claude \
60+ --userns=keep-id:uid=1001,gid=1001 \
61+ $PODMAN_ARGS \
62+ " $IMAGE " --version
63+ exit 0
64+ ;;
5565 * )
5666 break
5767 ;;
Original file line number Diff line number Diff line change @@ -50,18 +50,14 @@ test_claude_uid() {
5050run_test " Claude user has UID 1000" \
5151 test_claude_uid
5252
53- # 5. Claude responds through full wrapper invocation (catches silent hangs)
54- test_wrapper_invocation () {
53+ # 5. Wrapper script starts claude and it responds
54+ test_wrapper () {
5555 local output
56- output=$( timeout 30 podman run \
57- --rm \
58- --user claude \
59- --userns=keep-id:uid=1000,gid=1000 \
60- " $IMAGE " --version 2>&1 )
56+ output=$( timeout 30 ./bin/claude --local --version 2>&1 )
6157 echo " $output " | grep -qE ' ^[0-9]+\.[0-9]+\.[0-9]+'
6258}
63- run_test " Claude responds through full wrapper invocation " \
64- test_wrapper_invocation
59+ run_test " Wrapper script starts claude " \
60+ test_wrapper
6561
6662# Summary
6763echo " "
You can’t perform that action at this time.
0 commit comments