Last active
February 29, 2024 16:14
-
-
Save barsa-net/e049b9651677491bda8ca1ca4ce2ab7c to your computer and use it in GitHub Desktop.
wagoodman/dive image builder for ARM64/aarch64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
RUN apk update && \ | |
apk add git make | |
WORKDIR /go/src | |
ARG DIVE_VERSION=${DIVE_VERSION:-v0.10.0} | |
RUN git clone https://github.com/wagoodman/dive.git dive && \ | |
git -C /go/src/dive checkout ${DIVE_VERSION} | |
WORKDIR /go/src/dive | |
ENV CGO_ENABLED=0 | |
RUN make build | |
FROM scratch AS export-stage | |
COPY --from=builder /go/src/dive/dist/dive_linux_amd64/dive . | |
FROM alpine:3.12 | |
ARG DOCKER_CLI_VERSION=${DOCKER_CLI_VERSION:-19.03.1} | |
RUN wget -O- https://download.docker.com/linux/static/stable/$(uname -m)/docker-${DOCKER_CLI_VERSION}.tgz | \ | |
tar -xzf - docker/docker --strip-component=1 && \ | |
mv docker /usr/local/bin | |
COPY --from=builder /go/src/dive/dist/dive_linux_amd64/dive /usr/local/bin | |
ENTRYPOINT ["/usr/local/bin/dive"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great, thank you. It seems to work for aarch64 as well. Working with Nvidia Jetson docker files here.
I was hoping to use dive to inspect a very large (30GB) dev docker image since I don't have enough free space on the VM to do a
docker save
on it. Unfortunately it looks like dive also has to make a copy and i also ran out of disk trying to run dive... Oh well, time to expand the vm disk one more time.