fix(deploy): many docker compose bug

This commit is contained in:
Ran
2026-02-12 08:23:25 +08:00
parent 35ce7d169d
commit 01cb6c85db
16 changed files with 228 additions and 90 deletions
+34 -2
View File
@@ -17,11 +17,43 @@ FROM alpine:latest
WORKDIR /app
RUN apk add --no-cache ca-certificates tzdata wget
RUN apk add --no-cache ca-certificates tzdata wget nerdctl cni-plugins iptables \
&& mkdir -p /opt/cni/bin \
&& (cp -a /usr/lib/cni/. /opt/cni/bin/ 2>/dev/null || true) \
&& (cp -a /usr/libexec/cni/. /opt/cni/bin/ 2>/dev/null || true) \
&& mkdir -p /etc/cni/net.d /var/lib/cni \
&& printf '%s\n' \
'{' \
' "cniVersion": "1.0.0",' \
' "name": "memoh-cni",' \
' "plugins": [' \
' {' \
' "type": "bridge",' \
' "bridge": "cni0",' \
' "isGateway": true,' \
' "ipMasq": true,' \
' "promiscMode": true,' \
' "ipam": {' \
' "type": "host-local",' \
' "ranges": [[' \
' { "subnet": "10.88.0.0/16" }' \
' ]],' \
' "routes": [' \
' { "dst": "0.0.0.0/0" }' \
' ]' \
' }' \
' },' \
' {' \
' "type": "portmap",' \
' "capabilities": { "portMappings": true }' \
' }' \
' ]' \
'}' > /etc/cni/net.d/10-memoh.conflist
COPY --from=builder /build/memoh-server /app/memoh-server
COPY --from=builder /build/spec /app/spec
RUN mkdir -p /var/lib/memoh/data
RUN mkdir -p /opt/memoh/data
EXPOSE 8080