Replies: 1 comment
-
I've written a blog post that explains how to migrate manually |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Docker App will not be maintained going forward and Docker is directing users to Porter if they want to keep using bundles. I'd like to make migrating easier for people by changing
porter create
so that you can tell it to create the bundle using existing files, for example the docker app files, or a compose/terraform/arm file, etc.The --mixin flag would tell Porter to call out to a mixin to generate the bundle, instead of creating a hello-world bundle. The mixin can then use any information available to it, such as files in the current directory, environment variables, docker context, etc to make the bundle.
Mixins that want support this feature should implement the following command:
The mixin's create command must generate a porter.yaml file in the current directory. Porter will generate the .dockerignore and .gitignore though the mixin may overwrite them to customize them further.
The new docker-app mixin, implements create, but doesn't do anything for build, install, upgrade, uninstall, invoke, etc. Once the bundle is generated by docker-app, the resulting bundle should use other mixins, such as docker-compose, to implement the bundle.
Example
I have a directory, myapp.dockerapp, that contains my bundle definition. I can run
porter create --mixin docker-app --dir myapp.porter -- myapp.dockerapp
, which translates to runningMIXIN create ../myapp.dockerapp
in the myapp.porter directory created by Porter.A new directory is created, myapp.porter with a Porter bundle that uses the docker-compose mixin and the docker-compose up command to implement the bundle. Metadata and parameters defined in the original bundle are populated on the Porter bundle. A readme.md is generated that explains how to use the new bundle with Porter.
Hard Coded parameters and credentials
Docker App only supports two credentials, https://github.com/docker/app/blob/9d2c67f87b7338eb1a0fa2f18eb81af3d2aac0e1/internal/packager/cnab.go#L179-L190. Additionally it generates some extra parameters for its own use. We will need to look those over and figure out which ones are needed in the final bundle.
Dir Flag
I'm suggesting that we add a --dir flag like we have for build, so that we can generate the bundle from a set of files in one place and save the generated files in a new location.
Beta Was this translation helpful? Give feedback.
All reactions