-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·44 lines (38 loc) · 1019 Bytes
/
build.sh
File metadata and controls
executable file
·44 lines (38 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
#
# Build the Claude Code Development Sandbox image
#
set -e
# Resolve the real directory of this script (handles symlinks)
resolve_script_dir() {
local source="${BASH_SOURCE[0]}"
while [ -L "$source" ]; do
local dir="$(cd -P "$(dirname "$source")" && pwd)"
source="$(readlink "$source")"
[[ "$source" != /* ]] && source="$dir/$source"
done
cd -P "$(dirname "$source")" && pwd
}
SCRIPT_DIR="$(resolve_script_dir)"
IMAGE_NAME="claude-sandbox"
NO_CACHE=""
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
--clean)
NO_CACHE="--no-cache"
shift
;;
*)
echo "Usage: $(basename "$0") [--clean]"
echo " --clean Build from scratch (no cache)"
exit 1
;;
esac
done
if [ -n "$NO_CACHE" ]; then
echo "Building $IMAGE_NAME from scratch (no cache)..."
else
echo "Building $IMAGE_NAME..."
fi
docker build $NO_CACHE -t "$IMAGE_NAME" "$SCRIPT_DIR"