Skip to content

All-in-one minimal multi-stage Dockerfiles, and GitHub action to buil…#259

Closed
nickcmaynard wants to merge 2 commits intoOpenSourceRisk:masterfrom
nickcmaynard:docker-release-flow
Closed

All-in-one minimal multi-stage Dockerfiles, and GitHub action to buil…#259
nickcmaynard wants to merge 2 commits intoOpenSourceRisk:masterfrom
nickcmaynard:docker-release-flow

Conversation

@nickcmaynard
Copy link

@nickcmaynard nickcmaynard commented Jul 31, 2024

This PR adds:

  1. Multi-stage Dockerfiles for centos-stream9, debian11 and fedora40 which compile & test (with Examples), and package minimal container images for executing ore-engine within a Container, thus avoiding the need for users to install dependencies, compile, etc. manually.
  2. A Github Action workflow to do this for centos-stream9 and debian11 all automatically, creating release-quality minimal container images in the ghcr.io container image repository associated with OpenSourceRisk (see https://github.com/nickcmaynard/ore-engine/pkgs/container/ore-engine)
  3. Documentation on usage of the released container images from (2).
  4. A tweak to the Python examples helper to allow it to search the PATH for ore, allowing execution of an Example within the container.

Limitations:

  1. I have not fully tested the build triggers, and it might be helpful to be able to manually run the workflow against a certain Git tag for manual release purposes.
  2. debian11 is not debian12 due to the Python-based Examples/ test suite's requirement for the "nose" library. "nose" needs Python 3.9 and debian12 doesn't have that. This area needs some work from a Python-capable person - "nose" appears to be beset with maintenance and IP concerns.

…d release images

Trigger on Docker changes, too

Fix bug in cache-to declaration when in PR

Search the PATH for the ORE executable when running Examples

Typo

Add basic usage documentation for the container images

Use ENTRYPOINT and update docs to match

Try to nail down the intra-build cache

Use GHA cache anyway, should catch PR rebuilds better

Attempt to isolate the various flavour builds from each other within the GHA cache

Cache from -latest as well

Use dynamic flavour

Trigger on workflow changes

Attempt to convert "config" to flavour params

remove some redundant comments and rearrange for readability

Include tests in the Dockerfiles in a skippable way

Perform tests inside docker build

Clarity changes

Make test results register correctly in PRs etc.

Fix bad cache spec
@nickcmaynard
Copy link
Author

Folks, a lot of effort was put into this. I hope that ORE hasn't been abandoned.

@farahkhashman
Copy link
Contributor

Hi @nickcmaynard, thank you so much for your contribution. ORE has not been abandoned, and a new release is forthcoming.
We appreciate your additions, but unfortunately, we are unable to merge them into our repository. This is largely due to internal security constraints that restrict us from officially uploading our images to the GitHub container image repository.
We have switched to using pytest instead of nose in our upcoming release; this should be sufficient in resolving your aforementioned point regarding Python/Debian/Nose. Once again, thank you for your work, the dockerfiles are especially impressive, and we will keep them in mind for future reference and consideration.

@nickcmaynard
Copy link
Author

@farahkhashman Thanks for your response.

With the complexity of ORE, I would encourage you to use container images as your primary delivery method - this means your customers don't have to go through the hassle of compiling. How you choose to distribute those images (ghcr.io, docker.io, your own repository) is largely immaterial - I am not wedded to ghcr.io!

If you would like me to wait for your new version, then submit an alternative PR with the Actions stuff stripped out, and pytest used, I would be happy to do that.

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

Successfully merging this pull request may close these issues.

2 participants