mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(deploy): many docker compose bug
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user