Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary difference? How should I build? #159

Open
DeanAyalon opened this issue Oct 17, 2024 · 4 comments
Open

Binary difference? How should I build? #159

DeanAyalon opened this issue Oct 17, 2024 · 4 comments

Comments

@DeanAyalon
Copy link

Hi there Jauderho,
First I'd like to say I appreciate your efforts in keeping the Dive image up to date with dependencies

I have no experience with Go, so please tell me if I my process is wrong.
I am using an Intel MacBook Pro (AMD64)

go build -o jauderho
docker create --name jauderho jauderho/dive
docker cp jauderho:/usr/local/bin/dive jauderho-dh
cmp -l jauderho jauderho-dh

The binary comparison found many differences, and so I wonder if something in my build process is not agnostic, and how to achieve a binary identical to the one you compiled

Thank you :)

@DeanAyalon DeanAyalon changed the title Binary difference? Binary difference? How should I build? Oct 18, 2024
@jauderho
Copy link
Owner

If you are looking for a docker image, these are already built out of my dockerfiles repo. The Dockerfile in this repo is from upstream and I do not actively update it.

Here's what I personally use: https://github.com/jauderho/dockerfiles/pkgs/container/dive

@DeanAyalon
Copy link
Author

DeanAyalon commented Oct 19, 2024

Not necessarily, I already am using your image

I made a small workaround to one of the errors Dive is currently experiencing, failing to locate blobs when using the containerd image store instead of the regular one

My image is based on docker:latest and copies the Dive binary into it

This allows you to run Dive using the normal image store without compromising the abilities using the containerd image store provides

deanayalon/dive-dind:jauderho features your binary:

COPY --from=jauderho/dive /usr/local/bin/dive /usr/local/bin/

For the sake of security, with how you never know what's in binaries, I tried compiling the code in your repository into a binary, which I then compared with the binary within your docker image

They do not match, and so, is something in my build process not agnostic, how do you build the binary from your source code?

@DeanAyalon
Copy link
Author

these are already built out of my dockerfiles repo

Ohh, sorry, should've taken a better look at the dockerfile you linked, it actually has the build process within it, awesome :)

@DeanAyalon
Copy link
Author

DeanAyalon commented Oct 19, 2024

Another question, unrelated but undeserving of its own issue

Forking Dive, one of my branches was tracking your main.
I accidentally pushed it, and the commits within ended up referencing a few of wagoodman's open issues, which got a tad spammy (DeanAyalon mentioned this issue in commit xxxxxx)

I was wondering how you made those commits without them appearing within wagoodman's repository

Also, thanks for the reply, I forgot to say

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants