This commit is contained in:
parent
9a77b2d8e0
commit
75f459b5a7
1 changed files with 6 additions and 16 deletions
22
Dockerfile
22
Dockerfile
|
@ -10,20 +10,10 @@ ENV CADVISOR_VERSION="v0.38.8"
|
||||||
|
|
||||||
WORKDIR $GOPATH/src/github.com/google/cadvisor
|
WORKDIR $GOPATH/src/github.com/google/cadvisor
|
||||||
|
|
||||||
RUN apk upgrade --no-cache && apk add \
|
RUN apk upgrade --no-cache \
|
||||||
libc6-compat="1.2.2-r3" \
|
&& apk add libc6-compat device-mapper findutils zfs build-base linux-headers bash git wget curl tar \
|
||||||
device-mapper="2.02.187-r1" \
|
&& curl -L "https://github.com/google/cadvisor/archive/${CADVISOR_VERSION}.tar.gz" | tar xvz --strip 1 \
|
||||||
findutils="4.8.0-r1" \
|
&& ./build/build.sh
|
||||||
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
|
|
||||||
|
|
||||||
# STEP 2 build the image including only the binary
|
# STEP 2 build the image including only the binary
|
||||||
FROM amd64/alpine:3.14.0@sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d AS base-amd64
|
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" \
|
libc6-compat="1.2.2-r3" \
|
||||||
device-mapper="2.02.187-r1" \
|
device-mapper="2.02.187-r1" \
|
||||||
findutils="4.8.0-r1" \
|
findutils="4.8.0-r1" \
|
||||||
zfs="2.0.3-r1" && \
|
zfs="2.0.3-r1" \
|
||||||
rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/google/cadvisor/cadvisor /usr/bin/cadvisor
|
COPY --from=builder /go/src/github.com/google/cadvisor/cadvisor /usr/bin/cadvisor
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue