-
Notifications
You must be signed in to change notification settings - Fork 56
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
[FEATURE] Ability to run soci create
command in CodeBuild
#760
Comments
We could consider adding a flag to allow you to control where to find the image content (e.g. I would expect that in many cases, the image that you want to build a SOCI index for is also being built by the same CodeBuild pipeline, right? There's some waste there where doing this would 1) create an image, 2) push the imaged to the registry, 3) pull the image from the registry with SOCI, 4) create and push a SOCI index. If I remember correctly, docker stores uncompressed tarballs locally and only compresses them on push so we couldn't just read directly from the docker storage. [citation needed] Possibly another approach would be to try to get SOCI into buildkit so you could build your SOCI index with |
@Kern-- I see, thanks. Yeah it's desired to have an option to use soci-snapshotter on environments like CodeBuild even though it's inefficient. I think buildkit is also preferable as it's often available on CI environments such as CodeBuild or GHA. |
fyi I just published a CDK construct to build and publish SOCI indices during CloudFomation deployment. |
We're going to take a look at this, but we want to answer the following questions:
|
@Kern-- Thanks for considering this! Regarding question 1, I don't have any concrete metrics, but at least here's my observation (correct me if I'm wrong!) As far as I know, there are currently two official ways to build SOCI index; 1. use soci-snapshotter CLI 2. use cfn-ecr-aws-soci-index-builder.
So I think there's certainly some missing pieces that should be filled in. Hope this helps, thanks! |
It will work in server-ful and non-ephemeral CI environments, where the necessary services (containerd, soci) can be available. Although I don't necessarily recommend using Github Actions for production CI, their runners are capable of the necessary steps. |
I see, thanks. ...but we love serverless and that's why we use Fargate :) |
Just an FYI, I do have a sample of generating an Index in a CodeBuild environment here. https://github.com/aws-samples/aws-fargate-seekable-oci-toolbox/tree/main/soci-codepipeline. As per @tmokmss comment:
You can actually run a separate containerd in the codebuild environment, and use that to generate the index. |
I am facing the same error while trying to create a SOCI index
|
It looks like you haven't started containerd inside of your container. Have you taken a look at Olly's comment? #760 (comment) Another option may be to install Finch. It will come preinstalled on macOS codebuild runners (usage guide), and can be installed on Amazon Linux by following these instructions. This will allow you to create SOCI indexes like so:
|
Description
Hi, when I try to run
soci create
command in a CodeBuild environment, I get the following error:I guess it's because containerd is not available in the environment. However, as CodeBuild job itself runs on a container environment, I think it isn't possible to install containerd and run its service inside the container. Because of this limitation, it's difficult to build and push a SOCI index from CodeBuild, which is a common use case in CI/CD context.
Can't we remove this dependency on containerd service from the
soci
CLI? In this project, SOCI index is built on a Lambda environment, which does not have containerd service running. I prefer this approach with less prerequisites on the build environment.Describe the solution you'd like
cfn-ecr-aws-soci-index-builder
seems to have already resolved this problem. I think we can follow this approach, but I'm not aware of any downside of it.Describe any alternative solutions/features you've considered
No response
Any additional context or information about the feature request
I created a prototype CLI to impement this idea (most of the code is just copied from the above project 😅 ). I confirmed it runs on a CodeBuild job successfully. I'd like to use
soci create
command in the same way :)https://github.com/tmokmss/soci-wrapper/
The text was updated successfully, but these errors were encountered: