ncoghlan / modularity / fedmod

Forked from modularity/fedmod 6 years ago
Clone
README.md

Modularity-tools

Requirements

Following packages are required: * python2-pytest

docker2openshift.py

The tool is used for generation OpenShift template from Dockerfile and from https://github.com/container-images/container-image-template/blob/master/openshift-template.yml already prepared by Modularity team. As Dockerfile as openshift-template.yml have to exist in the directory.

How to use docker2openshift.py

Run the command with following parameters:

./docker2openshift.py --dockerfile <full_path_to_Dockerfile> IMAGENAME

where parameters mean: * dockerfile ... means full path to Dockerfile * IMAGENAME ... means image name in register. Can be taken from command docker images or from some other registry.

The output of docker2openshift.py command is OpenShift template stored in temporary directory

Example usage:

   ./docker2openshift.py --dockerfile ~/work/programming/container-images/debugging-tools/Dockerfile registry.fedoraproject.org/debugging-tools
/home/phracek/work/programming/container-images/debugging-tools/Dockerfile
   OpenShift template is generated here: /tmp/tmpM0teUC/openshift-template.yml

How to run tests for docker2openshift.py

In order to run tests, run command:

py.test-2.7 tests/

Modulemd creation

./rpm2modulemd.py script creates modulemd file from package names. Output is written in modulemd-output.yaml file (multiple packages as input) or in file named after package name (single package as input).

Please make sure you have latest module-build-service and dnf installed before running.