-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Cadvisor for ARM #1236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wonder if cross compilation for arm just works.. cc @luxas |
I would just add However, if we want to cross-build a docker image, we probably have to base it on debian for other arches than If we decide on a naming convention for non-amd64 cAdvisor and think we should do it, I may send a PR that builds cAdvisor images for |
It might help to automate the docker image release process in cadvisor to On Thu, Apr 21, 2016 at 10:48 AM, Lucas Käldström [email protected]
|
I may do it if you want it |
@luxas: That will be awesome!! On Thu, Apr 21, 2016 at 10:55 AM, Lucas Käldström [email protected]
|
So for instance cAdvisor image does not handle ARM image? |
@mboussaa I'm not really sure what you mean. The current |
@luxas
I get the following error: vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_systemd.go:17:2: no buildable Go source files in /go/src/github.com/google/cadvisor/vendor/github.com/coreos/go-systemd/util
Makefile:35: recipe for target 'build' failed Do you know what I'm doing wrong ? |
I compiled cadvisor and managed to edit the dockerfile to work on my raspberry pi. |
@Brain-Gamer could you provide the dockerfile/instructions so others can do the same ? |
@rjlee sure! It takes maybe a few days but I will do it ;) |
@Brain-Gamer many thanks for sharing. |
Hi, want to check if the cadvisor docker image can be considered for being extended to be multi-arch on docker hub? (as per above comments right now its for intel/amd64 arch) The process for doing so would be along the lines as per here: https://github.com/docker-library/official-images#multiple-architectures My interest here is to ultimately see a cadvisor docker image under https://hub.docker.com/u/ppc64le/ However since cadvisor is not a official Docker image, the first step i guess would be to make it official https://docs.docker.com/docker-hub/official_repos/#how-do-i-create-a-new-official-repository and then move to making the dockerfiles multi-arch (this process is as per Docker) Want to check if this makes sense/any comments? |
Hi, currently we tried to port cAdvisor to a multiarchitecture Docker Image. The source repository is unibaktr/docker-cadvisor. Therefore, we restructured the Dockerfile to use a slim Debian based image, since all binaries, cAdvisor uses, are rarely available for Alpine based multiarchitecture images. Feel free to try it out Perhaps we can find a way to integrate our work it into the official cAdvisor Repo. Best regards |
The images released above are outdated. I created a cadvisor v0.34.0 docker images for my Raspberry Pi. I have used docker buildx which is still experimental. It supports multi architecture(kubernetes/kubernetes#73365) (arm, arm64, 386, x86_64). I would like to have a look if someone is interested. https://github.com/ZCube/cadvisor-docker |
FYI, I managed to build and push an ARM image with this multistage Docker build & buildkit: FROM golang:1.13-buster AS builder
ARG VERSION
RUN apt-get update \
&& apt-get install make git bash gcc \
&& mkdir -p $GOPATH/src/github.com/google \
&& git clone https://github.com/google/cadvisor.git $GOPATH/src/github.com/google/cadvisor
WORKDIR $GOPATH/src/github.com/google/cadvisor
RUN git fetch --tags \
&& git checkout $VERSION \
&& make build \
&& cp ./cadvisor /
# ------------------------------------------
# Copied over from deploy/Dockerfile except that the "zfs" dependency has been removed
# a its not available fro Alpine on ARM
FROM alpine:3.10
MAINTAINER [email protected] [email protected] [email protected] [email protected] [email protected]
RUN apk --no-cache add libc6-compat device-mapper findutils && \
apk --no-cache add thin-provisioning-tools --repository http://dl-3.alpinelinux.org/alpine/edge/main/ && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
rm -rf /var/cache/apk/*
# Grab cadvisor from the staging directory.
COPY --from=builder /cadvisor /usr/bin/cadvisor
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"] and
|
Ah, just saw its more or less the same as in https://github.com/ZCube/cadvisor-docker (not sure why |
well, it doesn't work over there for arm, too :) |
I updated our images to use buildx with CircleCI, so feel free to use unibaktr/cadvisor again ;) |
I think it would be great if we can have (non-docker) binaries for arm64 in addition to amd in assets. Right now, I am cloning the repo and building it using |
still no ARM support? :-/ |
ARM is not only RPI but also for example m6g on Amazon. Why it's so hard to build for ARM too? |
Perhaps the release script could be updated to build a multi-arch image using buildx; Lines 43 to 46 in 6fd4cd9
|
We could probably use goreleaser to build downloadable binaries and container images for any platform that we want. I don't think that any official ARM images make sense before #2744 is merged: it seems that majority of reported issues is related to RPi. |
As a workaround i have been building cadvisor from src for arm64. But of
course this is problematic since it needs to be run again every time cicd
job runs on gitlab.
…On Mon, Jan 4, 2021, 11:19 PM iwankgb ***@***.***> wrote:
We could probably use goreleaser
<https://github.com/goreleaser/goreleaser> to build downloadable binaries
and container images for any platform that we want. I don't think that any
official ARM images make sense before #2744
<#2744> is merged: it seems that
majority of reported issues is related to RPi.
@sabretus <https://github.com/sabretus> I will make sure to test these
changes against Graviton 2 and any other server ARM platform I will be able
to get hold of :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1236 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3S5IJHVBP2YG6S3EGMLS3SYIBB5ANCNFSM4CBSE6VA>
.
|
@muzammil360 can you share the |
@bahamut657 Building arm64 is trivial. I can share the basic code
Regarding the dockerfile, I don't have it right now. But putting above code and making one should be again trivial. Just use some golang image as base. Shoot me for more questions. |
@bahamut657 just as I was looking, I found a dockerfile online. May be this will work faster for you. |
@bobbypage @haircommander I am open to discussing adding arm64 release for cadvisor. But would need some guidance for that. |
It's something that I want to address in #2835. |
I used the buildx approach of @rhuss. That works fine until v0.39.0. Starting from there I get exec errors. Like this for v0.40.0
|
https://twitter.com/fatih/status/1371391996003295234?lang=de introduced by #1837 Expose OOM event count to prometheus
|
+1 looking to build this on apple silicon |
I created my own Dockerfile to build.
After this it's running fine in v0.40 - v0.43 |
it already fixed in git master, just no release version yet. #3029 , me too still waiting release v0.4x with this fix |
I don't understand the fix 🤯. could anyone explain why it matters that the uint64 comes first in the struct? or am I missing sth. obvious??? |
Maybe an old issue but this might help if you want to build the image yourself. Thanks, @rhuss for the initial dockerfile. Made some modifications to the build process but if you have your own registry this should work fine. https://gist.github.com/daveshow/e990656bba8451d85673640cac605e2c |
Yes, these can be confusing; search for "type alignment"; e.g., see https://go.dev/ref/spec#Size_and_alignment_guarantees and https://go101.org/article/memory-layout.html#alignment-guarantee |
Pretty sure this was fixed in #3141. Is there a reason this is still open? |
Yes, it is done, I think we can close this. |
I guess the current version of Cadvisor doest not support RPI docker images. I am not sure about that since I did not test it yet.
Is it possible to provide support for ARM images?
The text was updated successfully, but these errors were encountered: