diff --git a/dogen/generator.py b/dogen/generator.py
index d59602d..50ed93c 100644
--- a/dogen/generator.py
+++ b/dogen/generator.py
@@ -226,6 +226,15 @@ class Generator(object):
         self.log.info("Finished!")
 
     def render_from_template(self):
+        maintainer = self.cfg.get('maintainer')
+
+        # https://github.com/jboss-dockerfiles/dogen/issues/129
+        if maintainer:
+            if not self.cfg.get('labels'):
+                self.cfg['labels'] = []
+
+            self.cfg['labels'].append({'name': 'maintainer', 'value': maintainer})
+
         if self.template:
             template_file = self.template
         else:
diff --git a/dogen/templates/template.jinja b/dogen/templates/template.jinja
index 7b81139..4754bb0 100644
--- a/dogen/templates/template.jinja
+++ b/dogen/templates/template.jinja
@@ -18,11 +18,6 @@
 
 FROM {{ helper.base_image(from, version) }}
 
-{% if maintainer %}
-MAINTAINER {{ maintainer }}
-
-{% endif -%}
-
 # Environment variables
 ENV JBOSS_IMAGE_NAME="{{name}}" \
     JBOSS_IMAGE_VERSION="{{version}}" {% if helper.envs(envs) %}\{% for env in helper.envs(envs) %}

Generate "maintainer" label instead using the MAINTAINER instruction
https://docs.docker.com/engine/reference/builder/#maintainer-deprecated

We should use `maintainer` label.
diff --git a/tests/test_dockerfile.py b/tests/test_dockerfile.py
index 1c6fec8..33534bb 100644
--- a/tests/test_dockerfile.py
+++ b/tests/test_dockerfile.py
@@ -131,9 +131,6 @@ class TestDockerfile(unittest.TestCase):
 
     # https://github.com/jboss-dockerfiles/dogen/issues/124
     def test_debug_port(self):
-        """
-        Test that cmd: is mapped into a CMD instruction
-        """
         with open(self.yaml, 'ab') as f:
             f.write("ports:\n  - value: 8080\n  - value: 9999\n    expose: False".encode())
 
@@ -147,3 +144,19 @@ class TestDockerfile(unittest.TestCase):
             dockerfile = f.read()
             regex = re.compile(r'.*EXPOSE 8080$',  re.MULTILINE)
             self.assertRegexpMatches(dockerfile, regex)
+
+    # https://github.com/jboss-dockerfiles/dogen/issues/129
+    def test_generating_maintainer_label(self):
+        with open(self.yaml, 'ab') as f:
+            f.write("maintainer: Marek Goldmann".encode())
+
+        generator = Generator(self.log, self.args)
+        generator.configure()
+        generator.render_from_template()
+
+        self.assertEqual(generator.cfg['labels'], [{'name': 'maintainer', 'value': 'Marek Goldmann'}])
+
+        with open(os.path.join(self.target, "Dockerfile"), "r") as f:
+            dockerfile = f.read()
+            regex = re.compile(r'LABEL name=\"\$JBOSS_IMAGE_NAME\" \\\s+version=\"\$JBOSS_IMAGE_VERSION\" \\\s+architecture=\"x86_64\" \\\s+com.redhat.component=\"someimage\" \\\s+maintainer=\"Marek Goldmann\"',  re.MULTILINE)
+            self.assertRegexpMatches(dockerfile, regex)

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov mock
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
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
docopt==0.6.2
-e git+https://github.com/jboss-dockerfiles/dogen.git@c4cd03cb2352e4538e6bdc64800a2184ce1998e4#egg=dogen
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mock==5.2.0
packaging==24.2
pluggy==1.5.0
pykwalify==1.8.0
pytest==8.3.5
pytest-cov==6.0.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: dogen
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:
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mock==5.2.0
      - packaging==24.2
      - pluggy==1.5.0
      - pykwalify==1.8.0
      - pytest==8.3.5
      - pytest-cov==6.0.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/dogen

tests/test_dockerfile.py::TestDockerfile::test_generating_maintainer_label
tests/test_dockerfile.py::TestDockerfile::test_debug_port tests/test_dockerfile.py::TestDockerfile::test_default_cmd_user tests/test_dockerfile.py::TestDockerfile::test_set_cmd tests/test_dockerfile.py::TestDockerfile::test_set_cmd_user tests/test_dockerfile.py::TestDockerfile::test_set_entrypoint tests/test_dockerfile.py::TestDockerfile::test_volumes
dogen/generator.py dogen/templates/template.jinja
dogen/generator.py dogen/templates/template.jinja