Skip to content

Commit

Permalink
Add: Cadvisor for ARM architecture.
Browse files Browse the repository at this point in the history
  • Loading branch information
nakoo committed Mar 21, 2020
1 parent 8e87549 commit 8acf7aa
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions cadvisor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM golang:1.14.1-alpine

ARG VERSION=v0.35.0

RUN apk add --no-cache --virtual .build-deps gcc git make bash libc-dev \
&& 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 \
&& mv cadvisor /cadvisor \
&& apk del .build-deps

# Reference: https://github.com/google/cadvisor/blob/master/deploy/Dockerfile

FROM alpine:latest

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/*

COPY --from=0 /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"]

0 comments on commit 8acf7aa

Please sign in to comment.