X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-metrics.git;a=blobdiff_plain;f=docker-build%2Fcustom_metrics%2FDockerfile;h=e01365656c32e504e13e9547a081f2f267f6c33f;hp=902ab79f4c1c83037a069e049d19679522ca4133;hb=41e97b6c42e1ef28b40924005ec01affa58ea543;hpb=78833edbb349f73dca1d0d9749c410d6a4711cdf diff --git a/docker-build/custom_metrics/Dockerfile b/docker-build/custom_metrics/Dockerfile index 902ab79..e013656 100644 --- a/docker-build/custom_metrics/Dockerfile +++ b/docker-build/custom_metrics/Dockerfile @@ -29,8 +29,9 @@ RUN apk add --no-cache --virtual .build-deps build-base go godep curl tar git gl && mkdir -p ${GOPATH}/src/github.com/directxman12/k8s-prometheus-adapter \ && curl -fsSL -k https://github.com/DirectXMan12/k8s-prometheus-adapter/archive/v${CUSTOM_METRICS_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/github.com/directxman12/k8s-prometheus-adapter \ && cd ${GOPATH}/src/github.com/directxman12/k8s-prometheus-adapter \ -&& make all \ -&& mv _output/amd64/adapter /adapter \ +&& if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; fi \ +&& make all ARCH=${HOST_ARCH} \ +&& mv _output/${HOST_ARCH}/adapter /adapter \ && chmod +x /adapter \ && apk del .build-deps \ && rm -rf ${GOPATH} \