diff --git a/proxy/Dockerfile.binary b/proxy/Dockerfile.binary deleted file mode 100644 index 6fde502..0000000 --- a/proxy/Dockerfile.binary +++ /dev/null @@ -1,19 +0,0 @@ -# Ultra-minimal Dockerfile using pre-built binary, no RUN commands -FROM alpine:3.19 - -LABEL maintainer="ardenone" -LABEL description="Z.AI API proxy with token injection and Prometheus metrics" - -# Copy pre-built binary (statically linked or with minimal deps) -COPY --chown=1000:1000 zai-proxy /zai-proxy - -# Alpine includes ca-certificates by default -# Just need to set up non-root user -USER 1000:1000 - -EXPOSE 8080 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 - -ENTRYPOINT ["/zai-proxy"] diff --git a/proxy/Dockerfile.minimal b/proxy/Dockerfile.minimal deleted file mode 100644 index 63cda25..0000000 --- a/proxy/Dockerfile.minimal +++ /dev/null @@ -1,36 +0,0 @@ -# Minimal Dockerfile avoiding RUN commands that trigger overlayfs issues -FROM docker.io/library/golang:1.23-alpine - -LABEL maintainer="ardenone" -LABEL description="Z.AI API proxy with token injection and Prometheus metrics" - -WORKDIR /app - -# Copy go modules and source -COPY go.mod go.sum* ./ -COPY *.go ./ -COPY VERSION ./ - -# Build the binary (this RUN might work better than apk) -RUN go mod download && \ - VERSION=$(cat VERSION 2>/dev/null || echo "unknown") && \ - COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD 2>/dev/null || echo "unknown")} && \ - BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ) && \ - CGO_ENABLED=0 GOOS=linux go build -mod=mod \ - -ldflags="-s -w -X main.version=$VERSION -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME" \ - -o zai-proxy . - -# The golang:1.23-alpine image already has ca-certificates and apk -RUN apk add --no-cache ca-certificates && \ - adduser -D -u 1000 proxyuser && \ - chmod +x zai-proxy && \ - chown proxyuser:proxyuser zai-proxy - -USER proxyuser - -EXPOSE 8080 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 - -ENTRYPOINT ["/zai-proxy"] diff --git a/proxy/Dockerfile.simple b/proxy/Dockerfile.simple deleted file mode 100644 index 1427a35..0000000 --- a/proxy/Dockerfile.simple +++ /dev/null @@ -1,23 +0,0 @@ -# Simplified Dockerfile that avoids overlayfs mount issues -# Uses single-stage build with pre-compiled binary - -FROM docker.io/library/alpine:3.19 - -LABEL maintainer="ardenone" -LABEL description="Z.AI API proxy with token injection and Prometheus metrics" - -# Install ca-certificates and create user in one layer -RUN apk add --no-cache ca-certificates && \ - adduser -D -u 1000 proxyuser - -# Copy pre-built binary -COPY --chown=proxyuser:proxyuser zai-proxy /zai-proxy - -USER proxyuser - -EXPOSE 8080 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ - CMD wget -q --spider http://localhost:8080/health || exit 1 - -ENTRYPOINT ["/zai-proxy"]