-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 827 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 827 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
# bad — prebuilt sandbox image for LLM-driven browser automation
#
# Usage:
# docker build -t bad .
# docker run -e OPENAI_API_KEY=sk-... bad run --goal "Sign up" --url http://host.docker.internal:3000
# docker run -v ./cases.json:/data/cases.json -v ./out:/output \
# bad run --cases /data/cases.json --sink /output/ --concurrency 4
FROM mcr.microsoft.com/playwright:v1.58.2-noble
WORKDIR /app
# Install deps and build
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build
# Make CLI executable
RUN chmod +x dist/cli.js
# Default output directory (mount a volume here for persistence)
RUN mkdir -p /output
ENV AGENT_SINK_DIR=/output
# Run headless by default
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
ENTRYPOINT ["node", "dist/cli.js"]
CMD ["--help"]