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

Generate container config from image manifest #669

Open
mathstuf opened this issue Oct 12, 2018 · 3 comments
Open

Generate container config from image manifest #669

mathstuf opened this issue Oct 12, 2018 · 3 comments

Comments

@mathstuf
Copy link

It would be nice to be able to generate a config.json based on the output of docker inspect or podman inspect. Images (or containers) already have knowledge of things like exposed ports, commands to run, etc. and it'd be nice to be able to use that as a base for generating a config.json.

Example:

oci-runtime-tool generate --image image.json …
@zhouhao3
Copy link

zhouhao3 commented Oct 17, 2018

I this it's a good idea, and I'm prepared to do this.
As you said, before running this function we need a json file of the results of the docker inspect, and then we run the generate function on this basis to produce the new json file. Is my understanding correct?

@mathstuf
Copy link
Author

Yes. I suspect there are multiple different formats out there (Docker-specific, OCIv1, probably others from other tools), but I think they all have a MIME type key in there somewhere to tell them apart from each other.

@mathstuf
Copy link
Author

Also nice would be converting a systemd.nspawn file into a config.json.

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