cortex-tools icon indicating copy to clipboard operation
cortex-tools copied to clipboard

docker: no amd64 arch for v0.11.0

Open clwluvw opened this issue 2 years ago • 2 comments

The latest version (v0.11.0) doesn't have any amd64 arch available. https://hub.docker.com/layers/grafana/cortex-tools/v0.11.0/images/sha256-7f081e85823c6965780fb9d2c0eddfbd46526e3a237ddd538ea550a1ebd5142b?context=explore

clwluvw avatar Sep 11 '23 15:09 clwluvw

100% the dev used a Macbook and had no idea about the M2 chip vs. X64 lol.

sharkymcdongles avatar Oct 20 '23 09:10 sharkymcdongles

It's still an issue, meaning that latest image from grafana/cortex-tools:v0.11.0 cannot be used in ci pipelines that are running on amd64 arch. Current workaround to use Docker image built internally.

Fix is quite simple, adding --platform=linux/amd64 to base docker image would pull in the correct base layer and building locally with: docker buildx build --platform=linux/amd64 --no-cache -t grafana/cortex-tools .

FROM --platform=linux/amd64 golang:1.16.8-stretch as build
ARG GOARCH="amd64"
COPY . /build_dir
WORKDIR /build_dir
ENV GOPROXY=https://proxy.golang.org
RUN make clean && make cortextool

FROM      --platform=linux/amd64 alpine:3.14
RUN        apk add --update --no-cache ca-certificates
COPY       --from=build /build_dir/cmd/cortextool/cortextool /usr/bin/cortextool
EXPOSE     80
ENTRYPOINT [ "/usr/bin/cortextool" ]

pavars avatar Nov 17 '23 14:11 pavars

Is this a supported image by Grafana? Is anyone planning on fixing this?

jkaye2012 avatar Jun 05 '24 22:06 jkaye2012

Hi! 👋 I just pushed v0.11.1 which includes a build for linux/amd64.

grobinson-grafana avatar Jun 13 '24 15:06 grobinson-grafana

@grobinson-grafana - I guess there's no actual difference between 0.11.0 and 0.11.1 except the architecture for which it was built. Just in case someone is wondering.

marinnedea avatar Jun 13 '24 15:06 marinnedea

We had to upgrade the Go version to 1.22, but otherwise no changes. There is a release here.

grobinson-grafana avatar Jun 13 '24 15:06 grobinson-grafana