diff --git a/Dockerfile b/Dockerfile index 592d506fc..9b7e264d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,14 +17,6 @@ COPY istio/ istio/ COPY build/ build/ RUN GOPROXY=direct,https://proxy.golang.org CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-w -s -X main.version=$VERSION -X main.gitsha=$GIT_COMMITSHA" -a -o meshery-istio main.go -FROM alpine:3.15 as jsonschema-util -RUN apk add --no-cache curl -WORKDIR / -RUN UTIL_VERSION=$(curl -L -s https://api.github.com/repos/layer5io/kubeopenapi-jsonschema/releases/latest | \ - grep tag_name | sed "s/ *\"tag_name\": *\"\\(.*\\)\",*/\\1/" | \ - grep -v "rc\.[0-9]$"| head -n 1 ) \ - && curl -L https://github.com/layer5io/kubeopenapi-jsonschema/releases/download/${UTIL_VERSION}/kubeopenapi-jsonschema -o kubeopenapi-jsonschema \ - && chmod +x /kubeopenapi-jsonschema # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details @@ -35,5 +27,4 @@ ENV MESHERY_SERVER="http://meshery:9081" COPY templates/ ./templates WORKDIR / COPY --from=builder /build/meshery-istio . -COPY --from=jsonschema-util /kubeopenapi-jsonschema /root/.meshery/bin/kubeopenapi-jsonschema ENTRYPOINT ["/meshery-istio"]