diff --git a/bash_completion/cekit b/bash_completion/cekit
index efdb39c..e1465c3 100755
--- a/bash_completion/cekit
+++ b/bash_completion/cekit
@@ -20,6 +20,7 @@ _cekit_build_options()
     options+='--build-osbs-user '
     options+='--build-osbs-nowait '
     options+='--build-osbs-stage '
+    options+='--build-osbs-target '
     options+='--build-tech-preview '
     echo "$options"
 }
@@ -73,6 +74,7 @@ _cekit_complete()
 	options+='--verbose '
 	options+='--version '
 	options+='--config '
+	options+='--redhat '
 	COMPREPLY=( $( compgen -W "$options" -- $cur ) )
 	return
 
diff --git a/cekit/builders/osbs.py b/cekit/builders/osbs.py
index b61a34c..f4c1372 100644
--- a/cekit/builders/osbs.py
+++ b/cekit/builders/osbs.py
@@ -18,6 +18,7 @@ class OSBSBuilder(Builder):
         self._user = params.get('user')
         self._nowait = params.get('nowait', False)
         self._release = params.get('release', False)
+        self._target = params.get('target')
 
         self._stage = params.get('stage', False)
 
@@ -119,9 +120,14 @@ class OSBSBuilder(Builder):
 
     def build(self):
         cmd = [self._rhpkg]
+
         if self._user:
             cmd += ['--user', self._user]
         cmd.append("container-build")
+
+        if self._target:
+            cmd += ['--target', self._target]
+
         if self._nowait:
             cmd += ['--nowait']
 
diff --git a/cekit/cli.py b/cekit/cli.py
index 54646be..55f9dd6 100644
--- a/cekit/cli.py
+++ b/cekit/cli.py
@@ -104,6 +104,10 @@ class Cekit(object):
                                  action='store_true',
                                  help='use rhpkg-stage instead of rhpkg')
 
+        build_group.add_argument('--build-osbs-target',
+                                 dest='build_osbs_target',
+                                 help='overrides the default rhpkg target')
+
         build_group.add_argument('--build-tech-preview',
                                  action='store_true',
                                  help='perform tech preview build')
@@ -200,7 +204,8 @@ class Cekit(object):
                           'release': self.args.build_osbs_release,
                           'tags': self.args.tags,
                           'pull': self.args.build_pull,
-                          'redhat': tools.cfg['common']['redhat']
+                          'redhat': tools.cfg['common']['redhat'],
+                          'target': self.args.build_osbs_target
                           }
 
                 builder = Builder(self.args.build_engine,
diff --git a/cekit/generator/base.py b/cekit/generator/base.py
index e55f7dc..b39cb7e 100644
--- a/cekit/generator/base.py
+++ b/cekit/generator/base.py
@@ -51,6 +51,7 @@ class Generator(object):
 
         self.image = Image(descriptor, os.path.dirname(os.path.abspath(descriptor_path)))
         self.target = target
+        self._params = params
 
         if overrides:
             self.image = self.override(overrides)
diff --git a/docs/build.rst b/docs/build.rst
index 8702b58..78d1f6d 100644
--- a/docs/build.rst
+++ b/docs/build.rst
@@ -25,6 +25,7 @@ You can execute an container image build by running:
 * ``--build-osbs-stage`` -- use ``rhpkg-stage`` tool instead of ``rhpkg``
 * ``--build-osbs-release`` [#f2]_ -- perform a OSBS release build
 * ``--build-osbs-user`` -- alternative user passed to `rhpkg --user`
+* ``--build-osbs-target`` -- overrides the default ``rhpkg`` target
 * ``--build-osbs-nowait`` -- run `rhpkg container-build` with `--nowait` option specified
 * ``--build-tech-preview`` [#f2]_ -- updates image descriptor ``name`` key to contain ``-tech-preview`` suffix in family part of the image name
   

Add support for overriding target in OSBS builder
We should be able to override the build target using the `--target` parameter to `rhpkg`.
diff --git a/tests/test_builder.py b/tests/test_builder.py
index 88ba3ec..b3dd769 100644
--- a/tests/test_builder.py
+++ b/tests/test_builder.py
@@ -114,6 +114,17 @@ def test_osbs_builder_run_rhpkg_user(mocker):
     check_call.assert_called_once_with(['rhpkg', '--user', 'Foo', 'container-build', '--scratch'])
 
 
+def test_osbs_builder_run_rhpkg_target(mocker):
+    params = {'target': 'Foo',
+              'redhat': True}
+
+    check_call = mocker.patch.object(subprocess, 'check_call')
+    builder = create_osbs_build_object(mocker, 'osbs', params)
+    builder.build()
+
+    check_call.assert_called_once_with(['rhpkg', 'container-build', '--target', 'Foo', '--scratch'])
+
+
 def test_docker_builder_defaults():
     params = {'tags': ['foo', 'bar']}
     builder = Builder('docker', 'tmp', params)
diff --git a/tests/test_unit_args.py b/tests/test_unit_args.py
index 1e221f1..fdb2042 100644
--- a/tests/test_unit_args.py
+++ b/tests/test_unit_args.py
@@ -90,6 +90,15 @@ def test_args_config(mocker):
     assert Cekit().parse().args.config == 'whatever'
 
 
+def test_args_target(mocker):
+    mocker.patch.object(sys, 'argv', ['cekit',
+                                      'build',
+                                      '--target',
+                                      'foo'])
+
+    assert Cekit().parse().args.target == 'foo'
+
+
 def test_args_redhat(mocker):
     mocker.patch.object(sys, 'argv', ['cekit',
                                       '--redhat',

pip install -e .
parse_log_pytest
requirements.txt
behave docker lxml mock pytest pytest-cov pytest-mock pykwalify
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
behave==1.2.6
-e git+https://github.com/cekit/cekit.git@da759627a7591993df8eb24778e2dd9ea39ae917#egg=cekit
certifi==2025.1.31
charset-normalizer==3.4.1
colorlog==6.9.0
coverage==7.8.0
docker==7.1.0
docopt==0.6.2
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
Jinja2==3.1.6
lxml==5.3.1
MarkupSafe==3.0.2
mock==5.2.0
packaging==24.2
parse==1.20.2
parse_type==0.6.4
pluggy==1.5.0
pykwalify==1.8.0
pytest==8.3.5
pytest-cov==6.0.0
pytest-mock==3.14.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
tomli==2.2.1
urllib3==2.3.0

name: cekit
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - behave==1.2.6
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - colorlog==6.9.0
      - coverage==7.8.0
      - docker==7.1.0
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - lxml==5.3.1
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - parse==1.20.2
      - parse-type==0.6.4
      - pluggy==1.5.0
      - pykwalify==1.8.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - six==1.17.0
      - tomli==2.2.1
      - urllib3==2.3.0
prefix: /opt/conda/envs/cekit

tests/test_builder.py::test_osbs_builder_run_rhpkg_target
tests/test_builder.py::test_docker_builder_defaults
tests/test_builder.py::test_osbs_builder_defaults tests/test_builder.py::test_osbs_builder_redhat tests/test_builder.py::test_osbs_builder_use_rhpkg_staget tests/test_builder.py::test_osbs_builder_nowait tests/test_builder.py::test_osbs_builder_user tests/test_builder.py::test_osbs_builder_run_rhpkg_stage tests/test_builder.py::test_osbs_builder_run_rhpkg tests/test_builder.py::test_osbs_builder_run_rhpkg_nowait tests/test_builder.py::test_osbs_builder_run_rhpkg_user tests/test_builder.py::test_docker_builder_run tests/test_builder.py::test_buildah_builder_run tests/test_builder.py::test_buildah_builder_run_pull tests/test_unit_args.py::test_args_command[generate] tests/test_unit_args.py::test_args_command[build] tests/test_unit_args.py::test_args_command[test] tests/test_unit_args.py::test_args_not_valid_command tests/test_unit_args.py::test_args_tags[tags0-build_tags0-expected0] tests/test_unit_args.py::test_args_tags[tags1-build_tags1-expected1] tests/test_unit_args.py::test_args_tags[tags2-build_tags2-expected2] tests/test_unit_args.py::test_args_tags[tags3-build_tags3-expected3] tests/test_unit_args.py::test_args_build_pull tests/test_unit_args.py::test_args_build_engine[osbs] tests/test_unit_args.py::test_args_build_engine[docker] tests/test_unit_args.py::test_args_build_engine[buildah] tests/test_unit_args.py::test_args_osbs_stage tests/test_unit_args.py::test_args_osbs_stage_false tests/test_unit_args.py::test_args_invalid_build_engine tests/test_unit_args.py::test_args_osbs_user tests/test_unit_args.py::test_args_config_default tests/test_unit_args.py::test_args_config tests/test_unit_args.py::test_args_target tests/test_unit_args.py::test_args_redhat tests/test_unit_args.py::test_args_redhat_default tests/test_unit_args.py::test_args_osbs_nowait tests/test_unit_args.py::test_args_osbs_no_nowait
cekit/builders/osbs.py cekit/generator/base.py bash_completion/cekit docs/build.rst cekit/cli.py
cekit/builders/osbs.py cekit/generator/base.py bash_completion/cekit docs/build.rst cekit/cli.py