forked from gni/pi-coding-agent-container
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 1 KB
/
Copy pathMakefile
File metadata and controls
37 lines (28 loc) · 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
# Helper Makefile to simplify running the secure agent container
# Usage: make run
.PHONY: build run clean shell
# Detect User ID and Group ID to prevent permission issues on Linux
UID := $(shell id -u)
GID := $(shell id -g)
# Create local data directory for persistence if using bind mount strategy
setup:
mkdir -p .pi-data
# Build the docker image locally from source/npm
build:
docker compose build
# Build without cache the docker image locally from source/npm
update:
docker compose build --no-cache
# Run the agent in interactive mode
# Passes the current user's UID/GID to the container
run: setup
UID=$(UID) GID=$(GID) docker compose run --rm pi-agent
# Run the agent with arguments (e.g., make args="--help" run-args)
run-args: setup
UID=$(UID) GID=$(GID) docker compose run --rm pi-agent $(args)
# Access the container shell for debugging
shell: setup
UID=$(UID) GID=$(GID) docker compose run --entrypoint /bin/bash --rm pi-agent
# Clean up stopped containers and networks
clean:
docker compose down