This commit is contained in:
2026-06-22 08:55:57 +08:00
parent dbb87823e8
commit 6ade6e8fa9
325 changed files with 41131 additions and 855 deletions
+9 -2
View File
@@ -27,9 +27,16 @@ FROM registry.jerryyan.top/library/alpine:3.24
# 均为 npm 包)。npm 全局 prefix 指到 /data/npm-global(持久卷),容器内
# `npm i -g xxx` 一次安装,重建镜像后无需重装;binary_path 填
# /data/npm-global/bin/<cli> 即可。
# bubblewrap + util-linux(prlimit/setpriv) 供 acp.sandbox mode=uid/container 使用:
# - prlimit 给 agent 子进程套 RLIMIT_AS/NPROC/CPU/FSIZE(sandbox_uid_linux.go)
# - bubblewrap 作 rootless 隔离(USER app 无 CAP_SYS_ADMIN,bwrap 走 user namespace)
# mode=none(默认)时这些工具不被调用,安装它们对默认部署无副作用。
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache ca-certificates tzdata git openssh-client nodejs npm && \
addgroup -S app && adduser -S app -G app
&& apk add --no-cache ca-certificates tzdata git openssh-client nodejs npm \
bubblewrap util-linux && \
addgroup -S app && adduser -S app -G app && \
addgroup -S sandbox && \
for i in 0 1 2 3 4 5 6 7 8 9; do adduser -S -D -H -G sandbox "sbx$i" 2>/dev/null || true; done
WORKDIR /app
COPY --from=go /out/server /app/server
COPY migrations /app/migrations