diff --git a/dogen/plugins/cct.py b/dogen/plugins/cct.py
index 5df1945..75f1ca0 100644
--- a/dogen/plugins/cct.py
+++ b/dogen/plugins/cct.py
@@ -32,10 +32,7 @@ class CCT(Plugin):
     def setup_cct(self, version):
         cctdist = '%s/.dogen/plugin/cct/%s/%s.zip' % (os.path.expanduser('~'), version, version)
         cct_runtime = '%s/.dogen/plugin/cct/%s/cct.zip' % (os.path.expanduser('~'), version)
-        if version == 'master':
-            # we dont care if it doesnt exist - so we ignore errors here
-            shutil.rmtree('%s/.dogen/plugin/cct/%s/' % (os.path.expanduser('~'), version), ignore_errors=True)
-        elif os.path.exists(cctdist):
+        if os.path.exists(cctdist):
             return cct_runtime
 
         os.makedirs(os.path.dirname(cctdist))
@@ -116,11 +113,13 @@ class CCT(Plugin):
 
         self.log.info("CCT plugin downloaded artifacts")
 
+        cfg['entrypoint'] = ['/usr/bin/cct']
+
         if 'runtime' in cfg['cct']:
-            cfg['entrypoint'] = ['/usr/bin/cct']
             self.runtime_changes(cfg)
             cfg['entrypoint'].append(cfg['cct']['runtime_changes'])
-            cfg['entrypoint'].append("-c")
+
+        cfg['entrypoint'].append("-c")
 
         if 'user' not in cfg['cct']:
             cfg['cct']['user'] = 'root'
diff --git a/dogen/schema/kwalify_schema.yaml b/dogen/schema/kwalify_schema.yaml
index 4a5a660..50ba8a0 100644
--- a/dogen/schema/kwalify_schema.yaml
+++ b/dogen/schema/kwalify_schema.yaml
@@ -43,10 +43,11 @@ map:
     seq:
       - map:
           value: {type: int, required: True}
+          expose: {type: bool}
+          description: {type: str}
   volumes:
       seq:
         - {type: str, required: True}
-  debugport: {type: int}
   dogen:
     map:
       version: {type: text}
diff --git a/dogen/template_helper.py b/dogen/template_helper.py
index 4f32ca7..3e88f03 100644
--- a/dogen/template_helper.py
+++ b/dogen/template_helper.py
@@ -63,3 +63,17 @@ class TemplateHelper(object):
 
         return envs
 
+    def ports(self, available_ports):
+        """
+        Combines all ports that should be added to the
+        Dockerfile into one array
+        """
+
+        port_list = []
+
+        for p in available_ports:
+            if p.get('expose', True):
+                port_list.append(p.get('value'))
+
+        return port_list
+
diff --git a/dogen/templates/template.jinja b/dogen/templates/template.jinja
index 4afbd7e..7b81139 100644
--- a/dogen/templates/template.jinja
+++ b/dogen/templates/template.jinja
@@ -45,7 +45,7 @@ LABEL name="$JBOSS_IMAGE_NAME" \
 
 {% if ports %}
 # Exposed ports
-EXPOSE {%- for port in ports %} {{ port.value }}{% endfor %}
+EXPOSE {%- for port in helper.ports(ports) %} {{ port }}{% endfor %}
 
 {% endif %}
 

Remove debugport key
Instead a port key should be used with a specific type, optionally.
diff --git a/tests/schemas/good/debugport.yaml b/tests/schemas/good/debugport.yaml
new file mode 100644
index 0000000..57a26a9
--- /dev/null
+++ b/tests/schemas/good/debugport.yaml
@@ -0,0 +1,13 @@
+# The minimal permitted configuration
+release: '1'
+version: '1'
+cmd:
+ - whoami
+from: scratch
+name: someimage
+ports:
+  - value: 8080
+    description: "This is default port"
+  - value: 9999
+    description: "This is debug port port"
+    expose: False
diff --git a/tests/test_dockerfile.py b/tests/test_dockerfile.py
index 63033dc..1c6fec8 100644
--- a/tests/test_dockerfile.py
+++ b/tests/test_dockerfile.py
@@ -128,3 +128,22 @@ class TestDockerfile(unittest.TestCase):
             dockerfile = f.read()
             regex = re.compile(r'.*VOLUME \["/var/lib"\]\nVOLUME \["/usr/lib"\]',  re.MULTILINE)
             self.assertRegexpMatches(dockerfile, regex)
+
+    # 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())
+
+        generator = Generator(self.log, self.args)
+        generator.configure()
+        generator.render_from_template()
+
+        self.assertEqual(generator.cfg['ports'], [{'value': 8080}, {'expose': False, 'value': 9999}])
+
+        with open(os.path.join(self.target, "Dockerfile"), "r") as f:
+            dockerfile = f.read()
+            regex = re.compile(r'.*EXPOSE 8080$',  re.MULTILINE)
+            self.assertRegexpMatches(dockerfile, regex)

pip install -e .
parse_log_pytest
requirements.txt
pytest 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
docopt==0.6.2
-e git+https://github.com/jboss-dockerfiles/dogen.git@f141578aafffa0dbc7a33e34b9456e22b1750698#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
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
      - 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
      - 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_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/plugins/cct.py dogen/schema/kwalify_schema.yaml dogen/template_helper.py dogen/templates/template.jinja
dogen/plugins/cct.py dogen/schema/kwalify_schema.yaml dogen/template_helper.py dogen/templates/template.jinja