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

[Enhancement] Add self-build Dockerfile for egeria #7684

Closed
planetf1 opened this issue May 17, 2023 · 3 comments · Fixed by #7685
Closed

[Enhancement] Add self-build Dockerfile for egeria #7684

planetf1 opened this issue May 17, 2023 · 3 comments · Fixed by #7685
Assignees
Labels
enhancement New feature or request triage New bug/issue which needs checking & assigning

Comments

@planetf1
Copy link
Member

Existing/related issue?

No response

Please describe the new behavior that that will improve Egeria

Create 'self-build' Dockerfile

This Dockerfile can be self-contained, ie it will build egeria from source, and create a suitable runtime container.
A multi-stage build can be used to ensure the runtime is kept lean.
Build arguments can be used to specify branch/commitid etc

This could be an alternative (not replacement) to the existing Dockerfile

  • easier to just copy around a single file
  • easier to add into a CI/CD process -- at least as an example
  • easier to document how to build the image
  • removes dependence on developer machine environment (ie versions of java)

Our very early dockerfiles (as well as, for example, the apache atlas dockerfile) used this approach. However egeria took a long time to build - at points getting well beyond 1 hour including tests, and even 40 mins without. Doing this twice - once native, and then again in a container, was really inefficient and slow, hence the current mechanism

With the build now refactored to use gradle, builds are a lot lot quicker, making this approach much more ameniable

Alternatives

Use the Existing Dockerfile. This requires:

  • local build (ie on macOS)
  • copying assembly to correct location
  • running docker build

Any Further Information?

I propose providing such a Dockerfile as an alternative example.

The possible downsides are

  • what testing is done of the alternate version

Would you be prepared to be assigned this issue to work on?

yes

@planetf1 planetf1 added enhancement New feature or request triage New bug/issue which needs checking & assigning labels May 17, 2023
@planetf1 planetf1 self-assigned this May 17, 2023
@planetf1 planetf1 changed the title [Enhancement] <title> [Enhancement] Add self-build Dockerfile for egeria May 17, 2023
planetf1 added a commit to planetf1/egeria that referenced this issue May 17, 2023
Signed-off-by: Nigel Jones <nigel.l.jones [email protected]>
planetf1 added a commit to planetf1/egeria that referenced this issue May 17, 2023
@planetf1
Copy link
Member Author

The first version of this has been done. Issues should be raised for any improvements

@dwolfson
Copy link
Member

@planetf1 Does this start from your local (possibly modified) source code or does it pull in a fresh copy from git and build it - seems to do the latter though I haven't inspected it..

@planetf1
Copy link
Member Author

planetf1 commented May 24, 2023

@planetf1 Does this start from your local (possibly modified) source code or does it pull in a fresh copy from git and build it - seems to do the latter though I haven't inspected it..

The latter. It's an entirely self-contained docker build. All you need is that single file - so you could copy it to docker.io, openshift etc & just build from that. Nothing else needed, no reliance on local context or installed software.

I thought it useful to check in as another example of how a dockerfile could be written - it's the same style I've used for atlas within the hadoop connector repository and I've found that style the simplest to work with when trying out 'alien' technologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage New bug/issue which needs checking & assigning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants