-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pypa_image.sh
More file actions
executable file
·50 lines (43 loc) · 2.1 KB
/
Copy pathrun_pypa_image.sh
File metadata and controls
executable file
·50 lines (43 loc) · 2.1 KB
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
45
46
47
48
49
50
#!/bin/bash
set -euo pipefail
# Runs the AlmaLinux 8 (pypa_2_28) desktop builder image produced by ./build_image.sh.
# Mirrors run_image.sh, but targets the new tag and keeps secrets out of this
# git-tracked file.
IMAGE="registry.gitlab.syncad.com/hive/haf/desktop-haf-builder:pypa_2_28-pg18-3"
CONTAINER_NAME="haf-builder-pypa"
SSH_PORT=2024
CONTAINER_HOSTNAME="vogel-haf-builder"
# --- Optional host bind mounts ------------------------------------------------
# Only mount daemon.json if it exists, otherwise docker would create a directory
# at the target path and break dockerd inside the container.
EXTRA_MOUNTS=()
if [ -f /etc/docker/daemon.json ]; then
EXTRA_MOUNTS+=(-v /etc/docker/daemon.json:/etc/docker/daemon.json:ro)
fi
# Make the script re-runnable: drop a previous instance of THIS container.
# (The old run_image.sh container, the shared /var/lib/docker cache, etc. are
# left untouched - only one builder should use /storage1/docker_cache at a time.)
docker rm -f "${CONTAINER_NAME}" >/dev/null 2>&1 || true
rm -rf /storage1/data/.vscode-server/.vscode-server
docker run -ti --init --pid=host --name "${CONTAINER_NAME}" \
-v /storage1/docker_cache:/var/lib/docker \
"${EXTRA_MOUNTS[@]}" \
-v /storage1/:/storage1/ \
-v /storage1/:/workspace/ \
-v /run/hive/:/storage1/mainnet-full/state/shared \
-v /storage1/data/.claude/:/home/haf_admin/.claude/ \
-v /storage1/data/.claude.json:/home/haf_admin/.claude.json \
-v /storage1/data/.vscode/:/home/haf_admin/.vscode/ \
-v /storage1/data/.vscode-server/:/home/haf_admin/.vscode-server/ \
-v "$HOME/.ssh/bwrona_gitlab_id_rsa:/home/haf_admin/.ssh/id_rsa" \
-e GITLAB_TOKEN="${GITLAB_TOKEN:-}" \
-e CLAUDE_CODE_OAUTH_TOKEN="${CLAUDE_CODE_OAUTH_TOKEN:-}" \
--privileged \
-p ${SSH_PORT}:22 \
--cap-add=SYS_PTRACE \
--cap-add=SYS_ADMIN \
--shm-size 1073741824 \
--hostname "${CONTAINER_HOSTNAME}" \
--add-host=steem-17.syncad.com:192.168.3.117 \
--add-host=registry.gitlab.syncad.com:192.168.6.104 \
"${IMAGE}" "$@"