diff --git a/Dockerfile b/Dockerfile index e7bb4d1..e260e56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,20 +10,10 @@ ENV CADVISOR_VERSION="v0.38.8" WORKDIR $GOPATH/src/github.com/google/cadvisor -RUN apk upgrade --no-cache && apk add \ - libc6-compat="1.2.2-r3" \ - device-mapper="2.02.187-r1" \ - findutils="4.8.0-r1" \ - zfs="2.0.3-r1" \ - build-base="0.5-r2" \ - linux-headers="5.10.41-r0" \ - bash="5.1.4-r0" \ - git="2.32.0-r0" \ - wget="1.21.1-r1" \ - curl="7.77.0-r1" \ - tar="1.34-r0" && \ - curl -L "https://github.com/google/cadvisor/archive/${CADVISOR_VERSION}.tar.gz" | tar xvz --strip 1 && \ - ./build/build.sh +RUN apk upgrade --no-cache \ + && apk add libc6-compat device-mapper findutils zfs build-base linux-headers bash git wget curl tar \ + && curl -L "https://github.com/google/cadvisor/archive/${CADVISOR_VERSION}.tar.gz" | tar xvz --strip 1 \ + && ./build/build.sh # STEP 2 build the image including only the binary FROM amd64/alpine:3.14.0@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d AS base-amd64 @@ -35,8 +25,8 @@ RUN apk upgrade --no-cache && apk add \ libc6-compat="1.2.2-r3" \ device-mapper="2.02.187-r1" \ findutils="4.8.0-r1" \ - zfs="2.0.3-r1" && \ - rm -rf /var/cache/apk/* + zfs="2.0.3-r1" \ + && rm -rf /var/cache/apk/* COPY --from=builder /go/src/github.com/google/cadvisor/cadvisor /usr/bin/cadvisor