<p>DockerFile</p>
<pre><code>FROM centos
RUN yum install java-1.8.0-openjdk-devel -y
RUN curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo |  tee /etc/yum.repos.d/jenkins.repo
RUN rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
RUN yum install jenkins --nogpgcheck -y
RUN yum install jenkins -y
RUN yum install -y initscripts
CMD /etc/init.d/jenkins start &amp;&amp; /bin/bash
</code></pre>
<p>the output of describing command</p>
<p><a href="https://i.stack.imgur.com/iLyR2.jpg" rel="nofollow noreferrer">enter image description here</a></p>
<p>output of logs
Starting Jenkins [  OK  ]</p>

Ajinkya Khandave
<p>There isn't an init system inside a container so this isn't going to work. Likely the specific issue is that with plain Docker you are using <code>docker run -it</code> so there is a stdin, so <code>bash</code> starts in interactive mode and keeps running. In Kubernetes there is no input so bash exits immediately and the container exits with it. You can't run stuff in the background like that. Maybe just use the <a href="https://hub.docker.com/r/jenkins/jenkins" rel="nofollow noreferrer">official <code>jenkins/jenkins</code> image</a>? Or at least check out how it's built.</p>
