-
Notifications
You must be signed in to change notification settings - Fork 57
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
build: merge heaptrack dockerfile with production dockerfile #1682
build: merge heaptrack dockerfile with production dockerfile #1682
Conversation
|
||
# Add heaptrack | ||
COPY --from=heaptrack-build /heaptrack/build/ /heaptrack/build/ | ||
COPY --from=heaptrack-build /usr/lib/ /usr/lib/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird, I would not blindly copy /usr/lib/
between images (especially different versions of images) as you might mess up some libraries.
I assume you are doing this because heaptrack actually drops some files in there? It would be good to know which files and only copy those rather than whole /usr/lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point. I will check it asap to have only the needed files copied.
Thanks @vpavlin !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, since you are linking files from /heaptrack/build/lib/heaptrack/
using LD_LIBRARY_PATH, you might not need this at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disregard, there are some libs missing when you don't include /usr/lib :)
Thanks for the PR @LNSD ! I like it :) |
From #1681:
I would recommend using Something like
We could also add Sadly it does not seem we can influence the name of the file heaptrack produces - so we cannot keep files from previous runs around easily. The only way I was able to "simulate" this was
But not sure how useful that is - whether it is worth the complications when running it:) |
In general LGTM, I was able to run it and it produced the heaptrack file, but sadly,I was not able to open it - heaptrack gave me a qt5 related error and also the produced files were only 10bytes large, so probably no content - not sure if I did something wrong, or it just did not ran long enough? |
Yes, it didn't run long enough. |
@vpavlin @Ivansete-status Please merge this PR into #1681 and continue the discussion there is a single PR open for the same changes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. Thanks !
* Adding Dockerfile_with_heaptrack * build: merge heaptrack dockerfile with production dockerfile (#1682) * Avoid blindly copy /usr/lib/ and install only the needed libraries * Adding heaptracker options in the Makefile * Dockerfile simplification. (apk add libunwind) * Dockerfile, Makefile: ++heaptrack params to nim build & 'heaptrack_support' in Nim compiler * Dockerfile, Makefile: more convenient name for 'NIM_COMMIT' Docker arg * Making 'NIM_COMMIT' more explicit --------- Co-authored-by: Lorenzo Delgado <lorenzo@status.im>
Both docker files can be consolidated into a single file by adding a
debug
stage and slightly modifying theMakefile
.