build_image: Add prodtar command to build a tar ball#51
build_image: Add prodtar command to build a tar ball#51pothos merged 2 commits intoflatcar-masterfrom
Conversation
8fabb72 to
50c5bb1
Compare
|
I think in general it is ok to add "tarball" to the list of supported format. However, if we start calling it "prodcontainer", then it gets hard to distinguish it from the existing "developer container". Both can be used for containers, but prod is a tarball, while dev is an image including partitions etc.? Users could get confused. If we want to introduce a real generic format for containers, ideally we should create an OCI image, by using tools like buildah or umoci. Though in reality we cannot say either that the standard OCI images are widely used. So I am not sure what the best way is. |
50c5bb1 to
c040a1b
Compare
|
Ok, I've renamed it. |
t-lo
left a comment
There was a problem hiding this comment.
Minor nit (documentation update), please consider including. Otherwise LGTM, approving.
build_image
Outdated
|
|
||
| prod - Production image for CoreOS. This image is for booting. | ||
| prod - Production image for CoreOS. This image is for booting (default if no argument is given). | ||
| prodtar - Production container tar ball (implies prod). Usable by machinectl import-tar or with docker import. |
There was a problem hiding this comment.
- "This can e.g. be used to run the Flatcar production image in a container."
There was a problem hiding this comment.
Updated it, but changed it to as a container because the image is run as a container and not inside one.
Create a tar ball with the contents of the / and /usr partitions to be used as follows with systemd-nspawn (via machinectl): machinectl import-tar flatcar-container.tar.gz flatcar-container machinectl start flatcar-container machinectl shell flatcar-container or with docker by converting it to an OCI image: docker import -c "CMD /bin/bash" flatcar-container.tar.gz flatcar-container Since the new "prodtar" command relies on the results of the "prod" command, it bundles it so that "prod prodtar" and "prodtar" is the same.
c040a1b to
21edb36
Compare
|
I have added a commit for Jenkins to produce this tar ball by default. |
Create a tar ball with the contents of the / and /usr partitions
to be used as follows with systemd-nspawn (via machinectl):
machinectl import-tar flatcar-container.tar.gz flatcar-container
machinectl start flatcar-container
machinectl shell flatcar-container
or with docker by converting it to an OCI image:
docker import -c "CMD /bin/bash" flatcar-container.tar.gz flatcar-container
Since the new "prodtar" command relies on the results of the "prod" command,
it bundles it so that "prod prodtar" and "prodtar" is the same.
Note: Document how to use the tars on the website. Automatically push docker images to a repository.