feat(deploy): define isolated managed test target
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
0b4b909a20
commit
c5cabf076f
9 files changed
+159
-10
No files matched your search
@@ -0,0 +1,22 @@
|
||||
FROM golang:1.25.3 AS build
|
||||
WORKDIR /src
|
||||
ENV CGO_ENABLED=0 GOTOOLCHAIN=local
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY cmd/ ./cmd/
|
||||
RUN go build -trimpath -o /out/zapret-autotune ./cmd/zapret-autotune
|
||||
|
||||
FROM vernette/ss-zapret2@sha256:ba158180f27cd71a291ee521c291490374fd3fcf2f81eb1434ddfb19d35de45b
|
||||
USER root
|
||||
COPY --from=build /out/zapret-autotune /usr/local/bin/zapret-autotune
|
||||
COPY managed-target-entrypoint.sh /opt/managed-target-entrypoint.sh
|
||||
# Retain the pinned image's fakes and Lua; never mount host replacements.
|
||||
RUN if [ ! -e /opt/zapret2/lua ] && [ ! -L /opt/zapret2/lua ]; then \
|
||||
cp -a /opt/zapret2/lua.dist /opt/zapret2/lua; \
|
||||
fi \
|
||||
&& test -d /opt/zapret2/lua \
|
||||
&& mkdir -p /etc/zapret-autotune /var/lib/zapret-autotune/target \
|
||||
&& printf 'zapret-autotune-managed-v1\n' > /etc/zapret-autotune/target-id \
|
||||
&& chmod 700 /var/lib/zapret-autotune /var/lib/zapret-autotune/target
|
||||
ENTRYPOINT ["/bin/sh", "/opt/managed-target-entrypoint.sh"]
|
||||
CMD []
|
||||
Reference in new issue
Block a user