Fedora-konttien ylläpito

Kerroksellisen levykuvan ylläpito

Kerrokselliset levykuvat Fedorassa ovat kontteja, jotka käyttävät joko fedora- tai fedora-minimal-peruslevykuvaa. Näiden levykuvien konttiedostoja (tai Docker-tiedostoja) ylläpidetään Fedoran dist-gitissä käyttämällä kontin nimiavaruutta.

You can maintain different version of an image using git branches, in dist-git each Fedora release has a branch, for example Fedora 32 has a git branch f32, Fedora 31 a f31 branch and so on. The main branch is used for Fedora rawhide the development version of Fedora.

Install fedpkg

fedpkg is used to interact with Fedora infrastructure. You can install it using the following command: ` $ sudo dnf install fedpkg `

Cloning a dist-git repository and building a image

In order to build a layered image using Fedora’s container build system, you first need to clone the image git repository either using fedpkg or git: Here, the repository is called tools. All container repositories are in the container namespace in the Fedora sources.

# Using git with the clone URL: $ git clone https://src.fedoraproject.org/container/tools.git

# Enter the repository: $ cd tools && ls Dockerfile README.md root ```

You need to authenticate with the buildsystem to trigger builds, this is done using kerberos

``` $ kinit username@FEDORAPROJECT.ORG Password for username@FEDORAPROJECT.ORG: ```

You can now trigger the build

``` $ fedpkg container-build Created task: 52510681 Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=52510681 Watching tasks (this may be safely interrupted)... 52510681 buildContainer (noarch): free ```

You get a link to the builsystem task, this is useful in case you build fails and you need to inspect the logs.

== Creating a Container update

To create an update for a container image you need to be the maintainer or co-maintainer of that image. For that you first need to be part of Fedora's https://docs.fedoraproject.org/en-US/package-maintainers/Joining_the_Package_Maintainers/[packager group].

Once you have a build created you need to create an update in https://bodhi.fedoraproject.org/[Fedora's update system].

After login in the web application, you create an a new update. In the new update from use the NVR (Name Version Release) of the container build to populate the "Builds" section. Then add some description and metadata as needed and submit the update.

The container is available on Fedora's https://candidate-registry.fedoraproject.org/v2/_catalog?n=200[candidate-registry] for testing. When the update reach the stable state it will then be available on https://registry.fedoraproject.org/[registry.fedoraproject.org].

== Opening a Pull Request

https://docs.fedoraproject.org/en-US/ci/pull-requests/[Pull Requests on dist-git]