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

Makefile target to build linux executable in build container #7392

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

guymguym
Copy link
Member

Explain the changes

  1. Added a make executable target to build the noobaa-core single-executable (with pkg for now) for linux x86_64 inside a build container.

Issues: Fixed #xxx / Gap #xxx

  1. NA

Testing Instructions:

  1. See standalone.md - tldr - make executable
  • Doc added/updated

@guymguym guymguym added the Standalone Work items needed to run standalone (without kubernetes) label Jul 11, 2023
Makefile Outdated Show resolved Hide resolved
@@ -0,0 +1,11 @@
# This dockerfile exports just the single file executable from the built image.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need 2 Dockerfiles?
if this is intended to be built using the makefile we can write it as an additional stage in executable.Dockerfile and in the make file use a target for building.

Copy link
Member Author

@guymguym guymguym Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had this in the same dockerfile when I started, the problem is that when using docker build --output <dir> it seems to not save the cache because it only outputs the content to a directory, and I wanted to have a proper cache. So with an intermediate step that has a named image (noobaa-core-executable) the cache is saved and only the export step uses the --output flag.

Signed-off-by: Guy Margalit <guymguym@gmail.com>
Copy link
Contributor

@liranmauda liranmauda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guymguym guymguym merged commit b97526d into noobaa:master Jul 11, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Standalone Work items needed to run standalone (without kubernetes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants