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?
I wonder if cross compilation for arm just works.. cc @luxas
I would just add GOARCH=arm to go build command in build/build.sh.
It should just work.
However, if we want to cross-build a docker image, we probably have to base it on debian for other arches than amd64. See the hyperkube image how to do this: https://github.com/kubernetes/kubernetes/blob/master/cluster/images/hyperkube/Makefile
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 arm, arm64, ppc64le.
It might help to automate the docker image release process in cadvisor to
ensure that arm images are built for every release.
On Thu, Apr 21, 2016 at 10:48 AM, Lucas Käldström [email protected]
wrote:
I would just add GOARCH=arm to go build command in build/build.sh.
It should just work.However, if we want to cross-build a docker image, we probably have to
base it on debian for other arches than amd64. See the hyperkube image
how to do this:
https://github.com/kubernetes/kubernetes/blob/master/cluster/images/hyperkube/MakefileIf 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 arm, arm64,
ppc64le.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/google/cadvisor/issues/1236#issuecomment-213035619
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]
wrote:
I may do it if you want it
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/google/cadvisor/issues/1236#issuecomment-213038189
So for instance cAdvisor image does not handle ARM image?
@mboussaa I'm not really sure what you mean.
On an ARM host, cAdvisor built for ARM may monitor ARM containers without problems.
The current cadvisor image on docker hub is built for linux/amd64 (like the most other things), so it won't run on an ARM host at all
@luxas
I tried to cross compile with Docker 4 Mac and a golang:1.6.3 container.
docker run -it --rm golang:1.6.3apt-get update && apt-get install vimgo get -d github.com/google/cadvisorcd $GOPATH/src/github.com/google/cadvisorvim build/build.sh and add env GOARCH=arm GOBIN=$PWD go "$GO_CMD" ${GO_FLAGS} -ldflags "${ldflags}" "${repo_path}"make buildI 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.
I uploaded the result here.
I decided to compile it my self because any other versions weren't up to date :D
@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 ;)
@rjlee I forked this repo and added the information you asked for in the readme. If you need anything else just ask ;)
@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
docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --detach=true --name=cadvisor unibaktr/cadvisor
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(https://github.com/kubernetes/kubernetes/issues/73365) (arm, arm64, 386, x86_64). I would like to have a look if someone is interested.
https://github.com/ZCube/cadvisor-docker
https://hub.docker.com/r/zcube/cadvisor
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
# Prepare
docker buildx create --name xbuilder
docker buildx use xbuilder
# Cross build
VERSION=v0.35.0
docker buildx build --build-arg VERSION=${VERSION} --platform linux/arm/v7,linux/amd64 --push -t rhuss/cadvisor:${VERSION} .
Ah, just saw its more or less the same as in https://github.com/ZCube/cadvisor-docker
(not sure why apk add zfs didn't work for me, though)
(not sure why
apk add zfsdidn't work for me, though)
well, it doesn't work over there for arm, too :)
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
https://hub.docker.com/r/zcube/cadvisor
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 make build. But it doesn't seem like a clean approach. Definitely would prefer something that I can just download using wget and unzip. Prometheus and all Prometheus related monitoring applications do that.
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?
Most helpful comment
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(https://github.com/kubernetes/kubernetes/issues/73365) (arm, arm64, 386, x86_64). I would like to have a look if someone is interested.
https://github.com/ZCube/cadvisor-docker
https://hub.docker.com/r/zcube/cadvisor