gramineproject / gsc

Gramine Shielded Containers (Docker integration)
BSD 3-Clause "New" or "Revised" License
46 stars 37 forks source link

Add support for ubi9, ubi9-minimal #207

Closed adarshan-intel closed 3 months ago

adarshan-intel commented 4 months ago

Description of the changes

Add support for ubi9, ubi9-minimal

How to test this PR?

To test this PR, set follow similar procedure as followed with Ubuntu and do gsc build and signing commands.


This change is Reviewable

adarshan-intel commented 4 months ago

@jkr0103 and @anjalirai-intel Please review

adarshan-intel commented 4 months ago

templates/redhat/ubi-minimal/Dockerfile.build.template line 4 at r4 (raw file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…
Note for other reviewers: this is a smart trick for splitting UBI-minimal. Note how `-` is used as a separator instead of `:` for UBI. That's because we need to extract the major version, and the distro name for UBI-minimal is `redhat/ubi9-minimal:9.4`. Whereas for UBI it is `redhat/ubi9:9.4`.

Thanks, this was the easier solution

adarshan-intel commented 4 months ago
Previously, dimakuv (Dmitrii Kuvaiskii) wrote…
The PR looks good to me. Waiting for reviews from others. TODO for myself: need to test it when all reviews are done.

Thanks

adarshan-intel commented 4 months ago

There is an option in gsc where you can just build gramine, and build workload image later, When I tried to build just gramine, it failed with error distro is not supported by GSC

Config.yaml Distro: "redhat/ubi9:9.4"

Steps to Reproduce ./gsc build-gramine bash_test Building base-Gramine Docker image bash_test... redhat/ubi9 distro is not supported by GSC.

The latest commits are addressing that issue. - https://github.com/gramineproject/gsc/pull/207/commits/747a51a71f2955dba74177d8c34b481c9f70c20e

adarshan-intel commented 3 months ago

templates/redhat/ubi/Dockerfile.build.template line 5 at r8 (raw file):

Previously, mkow (Michał Kowalczyk) wrote…
https://reviewable.io/reviews/gramineproject/gsc/207#-O21tXbL0TQQJ8fIYQol

Done. Implemented the regex_match function to validate regular expressions across various templates.