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

Container installation during image build #2663

Open
rjschwei opened this issue Oct 14, 2024 · 1 comment · May be fixed by #2664
Open

Container installation during image build #2663

rjschwei opened this issue Oct 14, 2024 · 1 comment · May be fixed by #2664
Assignees

Comments

@rjschwei
Copy link
Collaborator

Problem description

When building a VM image with kiwi there is no feature that supports the inclusion of containers in the image build unless any specific container is wrapped in a package. A use case exists where it is desirable to be able to include containerized application, SUSE Multi Linux Manager for example in an image such that upon startup of an instance the container application can be started without having to pull the container from a registry first. This will reduce the custom work a user of kiwi has to do.

Expected behaviour

Specify a element in the kiwi config file
Specify a container to pull into the image with a element in the kiwi config file

During build kiwi will pull the container using skopeo or some other suitable tool. When an instance of the image is booted a kiwi service will automatically import the container present in the image into the container runtime (podman or docker) local repository. This should happen prior to a service the use may include that starts the containerized application. Users would have the requirement to add a service with "After: kiwi-container-load.service" or whatever name may be chosen.

Steps to reproduce the behaviour

OS and Software information

  • KIWI version:
  • Operating system host version:
  • Operating system target version:
  • Open Build Service version (N/A if not using OBS):
    • Will need new OBS integration
  • Koji version (N/A if not using Koji):
@schaefi schaefi self-assigned this Oct 15, 2024
@schaefi
Copy link
Collaborator

schaefi commented Oct 15, 2024

@rjschwei thanks, going to come up with an solution suggestion soon

schaefi added a commit that referenced this issue Oct 15, 2024
Allow to specify references to OCI containers in the
image description like in the following example:

<registry source="registry.suse.com">
    <container name="some" tag="latest" path="some/path" use_with="podman"/>
    <container name="some_other" use_with="docker" fetch_only="true"/>
</registry>

During the kiwi process the containers are fetched into a
temporary location and a systemd service is configured to
one time load the containers into the local registry at
first boot of the system. This Fixes #2663
@schaefi schaefi linked a pull request Oct 15, 2024 that will close this issue
schaefi added a commit that referenced this issue Oct 15, 2024
Allow to specify references to OCI containers in the
image description like in the following example:

<registry source="registry.suse.com">
    <container name="some" tag="latest" path="some/path" use_with="podman"/>
    <container name="some_other" use_with="docker" fetch_only="true"/>
</registry>

During the kiwi process the containers are fetched into a
temporary location and a systemd service is configured to
one time load the containers into the local registry at
first boot of the system. This Fixes #2663
schaefi added a commit that referenced this issue Oct 19, 2024
Allow to specify references to OCI containers in the
image description like in the following example:

<containers source="registry.suse.com" backend="podman">
    <container name="some" tag="some" path="/some/path"/>
</containers>

During the kiwi process the containers are fetched into a
temporary location and a systemd service is configured to
one time load the containers into the local registry at
first boot of the system. This Fixes #2663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants