-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.wars
More file actions
21 lines (20 loc) · 916 Bytes
/
Copy pathDockerfile.wars
File metadata and controls
21 lines (20 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# bee-wars combatant image. One symmetric image runs both roles via the
# wars-agent supervisor: a defender service guarding /opt/vault and an attacker
# loop probing the opponent. Meant to run ONLY on an isolated arena network
# against one consenting opponent — never against real infrastructure.
FROM golang:1.26-alpine AS build
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -o /out/bee ./cmd/bee
FROM alpine:3.20
# attacker toolkit: HTTP, port scan, raw sockets, DNS
RUN apk add --no-cache curl nmap netcat-openbsd bind-tools busybox-extras \
&& adduser -D -u 10001 bee
COPY --from=build /out/bee /usr/local/bin/bee
# HOME on tmpfs so bee's config/sessions write under a --read-only rootfs
ENV HOME=/tmp
USER bee
# the referee injects the secret into /opt/vault at run time (never a layer)
# and sets BEE_WARS_OPPONENT / OPENAI_BASE_URL / BEE_MODEL via -e.
ENTRYPOINT ["bee"]
CMD ["wars-agent"]