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

Feature Request: Kaniko example usage as a library? #299

Open
StevenACoffman opened this issue Aug 21, 2018 · 7 comments
Open

Feature Request: Kaniko example usage as a library? #299

StevenACoffman opened this issue Aug 21, 2018 · 7 comments
Labels
area/behavior all bugs related to kaniko behavior like running in as root kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@StevenACoffman
Copy link

I would love to be able to invoke kaniko as an AWS Lambda or google cloud function.
I am not sure if anyone has already attempted this, and I know it's pretty different than standard usage. Just thought I'd mention in case there was other interest.

@bobcatfish
Copy link
Contributor

Thanks for opening this @StevenACoffman ! Note that Kaniko uses https://github.com/google/go-containerregistry under the hood, which might meet your needs - if not, can you give us some examples of what you'd like to do with this library?

@StevenACoffman
Copy link
Author

Thanks! I would like make a github commit generate a docker container with a AWS Lambda invocation. I can easily make an AWS Lambda webhook listener that subscribes to github events like commits, but then I need to go tell some other server to start up to build the container with kaniko. I can use AWS Codebuild, or leave some persistent servers around even when I don't need them, but I'd rather just use kaniko inside a lambda.

@tequilarista
Copy link

Re-triaging -- would this not be also possible with AWS Fargate? That's more of a good use case for Kaniko, methinks...

@donmccasland donmccasland added area/behavior all bugs related to kaniko behavior like running in as root priority/p3 agreed that this would be good to have, but no one is available at the moment. labels Sep 24, 2019
@abdennour
Copy link

@bobcatfish you didn't reply on the use case explained by @StevenACoffman since 3+ years.
We have similar use case as yours @StevenACoffman
Up! please

@StevenACoffman
Copy link
Author

StevenACoffman commented Jan 21, 2022

For Go code, I actually had a lot better luck using google/ko as a library per ko-build/ko#554
Please see:

https://gist.github.com/imjasonh/62d8e613cdc8a0953ff970c1cccdba2d
or
https://github.com/dvob/sko

@korostelevm
Copy link

+1 Kaniko on AWS Lambda

@onee-only
Copy link

onee-only commented Oct 23, 2024

I also wanted to use kaniko on AWS Lambda.
Since we can only write in /tmp, I came up with one dumb solution: change every / into /tmp in the source code.
And it didn't work for some reason. Feel free to see the modified code and how I used it.

I think maybe chroot could make it work? I didn't actually try it, but I have a good feeling about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/behavior all bugs related to kaniko behavior like running in as root kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

8 participants