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

Mixin, that generates a docker image #10

Closed
svennela opened this issue Nov 17, 2019 · 3 comments
Closed

Mixin, that generates a docker image #10

svennela opened this issue Nov 17, 2019 · 3 comments

Comments

@svennela
Copy link

I see porter creates the docker image and runs the mixins inside the docker image. I am trying to create a mixin, that generates a docker image. Is it possible to create a mixin that generates the docker image?

@carolynvs
Copy link
Member

carolynvs commented Nov 18, 2019

@svennela It depends on what you are looking to do. Let me give you two options with different porter-specific terms:

  1. mixin that can do docker builds. Essentially this mixin would embed the docker cli into the invocation image, and you can build docker images with it. It would not replace the porter build step that builds the invocation image for bundles but would let you build regular docker images when your bundle is running. We have an open issue for that in the main Porter repository: Design: Docker Mixin porter#152
  2. plugin that handles building the invocation image during porter build, for example to perform the build against a remote docker engine instead of the local one.

I am guessing that you mean the first, if you want to do that the best place to start is following the readme in this repository (porter-skeletor).

The trick will be perhaps adding a feature to porter to make sure that you have access to the same docker daemon, e.g. docker sock, env vars, etc, that porter used when it executed the bundle. I don't think we expose it now to the executing bundle but it's possible for porter to do so.

@svennela
Copy link
Author

that's right, I am talking about option1. More specifically I am talking pack cli (https://github.com/buildpack/pack/releases), which does source to the image.

Thank you for your response.
Sridhar

@carolynvs
Copy link
Member

@svennela I've created an issue in the main porter repo Request: Pack mixin to track the request for a new mixin and explain how to make it. If you don't mind, I'm going to close this one just so that there's no confusion for people about which one is the main issue and how to address it.

Thanks for the suggestion and let me know if you'd like try creating the mixin yourself!

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

No branches or pull requests

2 participants