-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2049 from SUSE/git_readme
README for the git container
- Loading branch information
Showing
4 changed files
with
88 additions
and
44 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
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,58 @@ | ||
"""Container description for the Git application container.""" | ||
|
||
from bci_build.container_attributes import BuildType | ||
from bci_build.container_attributes import PackageType | ||
from bci_build.container_attributes import SupportLevel | ||
from bci_build.os_version import ALL_NONBASE_OS_VERSIONS | ||
from bci_build.os_version import CAN_BE_LATEST_OS_VERSION | ||
from bci_build.os_version import OsVersion | ||
from bci_build.package import ApplicationStackContainer | ||
from bci_build.package import Package | ||
from bci_build.package import ParseVersion | ||
from bci_build.package import Replacement | ||
from bci_build.package.helpers import generate_from_image_tag | ||
from bci_build.package.versions import format_version | ||
from bci_build.package.versions import get_pkg_version | ||
|
||
GIT_CONTAINERS = [ | ||
ApplicationStackContainer( | ||
name="git", | ||
os_version=os_version, | ||
support_level=SupportLevel.L3, | ||
pretty_name=f"{os_version.pretty_os_version_no_dash} with Git", | ||
custom_description="A micro environment with Git {based_on_container}.", | ||
from_image=generate_from_image_tag(os_version, "bci-micro"), | ||
build_recipe_type=BuildType.KIWI, | ||
is_latest=os_version in CAN_BE_LATEST_OS_VERSION, | ||
version="%%git_version%%", | ||
tag_version=format_version( | ||
get_pkg_version("git", os_version), ParseVersion.MINOR | ||
), | ||
additional_versions=["%%git_major_version%%"], | ||
version_in_uid=False, | ||
replacements_via_service=[ | ||
Replacement( | ||
regex_in_build_description="%%git_version%%", | ||
package_name="git-core", | ||
), | ||
Replacement( | ||
regex_in_build_description="%%git_major_version%%", | ||
package_name="git-core", | ||
parse_version=ParseVersion.MAJOR, | ||
), | ||
], | ||
license="GPL-2.0-only", | ||
package_list=[ | ||
Package(name, pkg_type=PackageType.BOOTSTRAP) | ||
for name in ( | ||
"git-core", | ||
"openssh-clients", | ||
) | ||
+ (() if os_version == OsVersion.TUMBLEWEED else ("skelcd-EULA-bci",)) | ||
], | ||
# intentionally empty | ||
config_sh_script=""" | ||
""", | ||
) | ||
for os_version in ALL_NONBASE_OS_VERSIONS | ||
] |
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,29 @@ | ||
# {{ image.title }}: Git application container | ||
{% include 'badges.j2' %} | ||
|
||
|
||
## Description | ||
|
||
Git is a distributed version control system that tracks | ||
versions of files. Git is primarily designed for controlling source code in collaborative software development. | ||
|
||
|
||
## Usage | ||
|
||
This container provides the {{ image.publish_registry.vendor }} version of Git. | ||
|
||
Example of using Git container: | ||
|
||
```ShellSession | ||
$ podman run {{ image.pretty_reference }} git help | ||
``` | ||
|
||
As Git requires a repository, the container | ||
does not explicitly set an entrypoint. This way, you can launch the container in | ||
interactive mode to clone a repository and work on it. To avoid losing all your changes when exiting the container, use a persistent volume mount on launch. | ||
|
||
For more use cases and documentation, refer to the | ||
[Git SCM documentation](https://git-scm.com/doc). | ||
|
||
|
||
{% include 'licensing_and_eula.j2' %} |