-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
15 changed files
with
712 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright (c) 2024 SUSE Software Solutions Germany GmbH. All rights reserved. | ||
# | ||
# This file is part of kiwi. | ||
# | ||
# kiwi is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# kiwi is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with kiwi. If not, see <http://www.gnu.org/licenses/> | ||
# | ||
import os | ||
from string import Template | ||
from textwrap import dedent | ||
|
||
|
||
class BuilderTemplateSystemdUnit: | ||
""" | ||
**systemd unit file templates** | ||
""" | ||
def get_container_import_template(self) -> Template: | ||
template_data = dedent(''' | ||
# kiwi generated unit file | ||
[Unit] | ||
Description=Import Local Container: ${container_name} | ||
ConditionPathExists=${container_file} | ||
[Service] | ||
Type=oneshot | ||
ExecStart=${load_command} | ||
ExecStartPost=/bin/rm ${container_file} | ||
[Install] | ||
WantedBy=multi-user.target | ||
''').strip() + os.linesep | ||
return Template(template_data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.