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

Add a complete oci-bundle example for specs #187

Closed
ChengTiesheng opened this issue Sep 15, 2015 · 4 comments
Closed

Add a complete oci-bundle example for specs #187

ChengTiesheng opened this issue Sep 15, 2015 · 4 comments

Comments

@ChengTiesheng
Copy link
Contributor

Now, initial draft for OCI specs has been released, so I want to get an oci-bundle to study, and transform it to other container format.
However, I found that there is no complete oci-bundle example to use, and I had to scrabble up an oci-bundle directory through scanning the opencontainers/specs project.
So I think a complete oci-bundle example is needed. oci-bundle example is accompanied by oci specs, and its aim is for the convenience of users.

A complete oci-bundle example is something like this:
https://github.com/huawei-openlab/oci2aci/tree/master/example/oci-bundle

@wking
Copy link
Contributor

wking commented Sep 15, 2015

On Mon, Sep 14, 2015 at 08:21:24PM -0700, Tiesheng wrote:

However, I found that there is no complete oci-bundle example to
use, and I had to scrabble up an oci-bundle directory through
scanning the opencontainers/specs project.

I have a few OCI bundles in branches of 1, e.g. [2,3], but I haven't
updated them to match the v0.1.1 spec (or v0.1.0, #183). They're
2-clause BSD, so feel free to borrow under those terms ;).

I'm less enthusiastic about bundling an example like that into this
repository, since we'd have to pick a platform, vendor some random
binaries compiled elsewhere, etc. I think it's better to have a few
external repositories with simple things (like my busybox shell 2),
ideally under github.com/opencontainer/ and link to those.

@ChengTiesheng
Copy link
Contributor Author

@wking, thanks for your detailed reply. What I want is something like https://github.com/mrunalp/ocitools
When I run oci generate, I can get config.json and runtime.json, but no corresponding rootfs.
So what I exactly need is a tool can generate a complete bundle, including json files and rootfs.

@wking
Copy link
Contributor

wking commented Sep 25, 2015

On Thu, Sep 24, 2015 at 06:42:44PM -0700, Tiesheng wrote:

When I run oci generate, I can get config.json and runtime.json, but
no corresponding rootfs. So what I exactly need is a tool can
generate a complete bundle, including json files and rootfs.

Generating a rootfs is hard, because there are so many choices. For
example, this is the section of my Makefile that downloads a Gentoo
stage3 and unpacks the bare minimum needed to run a Go binary with
some cgo linking 1. That's not much work, but it is a ~200 MB
download (the whole, compressed stage3) for 3.8 MB of unpacked rootfs.
And if you don't trust the Gentoo releng signature, you'll be using
untrusted binaries. So I don't think my “grab stuff from a stage3”
approach is going to be everyone's cup of tea. But those are problems
without an easy solution. For example, if someone grabbed files from
a Debian release to populate a rootfs, you'd need to trust the Debian
releng signature (or however they sign their packages/releases). And
maybe you need more from your distribution than just ld, libc, and
libpthread? Or maybe you want musl and not glibc?

If folks intend to use OCI bundles directly (instead of through
higher-level tools like Docker), I think it's probably best to have
folks publish generic templates like my oci-gentoo-minimal master
branch, and then have folks who don't want to get into that just pick,
for example, someone else's popular BusyBox template (or whatever) for
their project.

@ChengTiesheng
Copy link
Contributor Author

Solved, thanks.

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