<p>I'm trying to customize the <code>jenkins/jenkins:latest</code> image in order to install Docker so I'm able to run docker within the jenkins pipeline but when I run the following code using the following files, the pods, jenkins-jenkins, terminate with &quot;Error&quot; without outputing any meaningfully logs.</p>
<p>Dockerfile (custom_image:latest)</p>
<pre><code>FROM jenkins/jenkins:latest
USER jenkins
</code></pre>
<p>(even though this Dockerfile is not installing docker the same error occurs)</p>
<p>values.yaml</p>
<pre><code>jenkins:
  name: 
  image: custom_image:latest
</code></pre>
<pre><code>helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
helm install jenkins jenkins/jenkins-operator -n jenkins -f values.yaml
</code></pre>
<p>Outputs...</p>
<p>kubectl describe pod/jenkins-jenkins</p>
<pre><code>...
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  12s   default-scheduler  Successfully assigned jenkins/jenkins-jenkins to minikube
  Normal  Pulled     11s   kubelet            Container image &quot;docker-jenkins:latest&quot; already present on machine
  Normal  Created    11s   kubelet            Created container jenkins-master
  Normal  Started    11s   kubelet            Started container jenkins-master
  Normal  Pulled     11s   kubelet            Container image &quot;virtuslab/jenkins-operator-backup-pvc:v0.1.0&quot; already present on machine
  Normal  Created    11s   kubelet            Created container backup
  Normal  Started    11s   kubelet            Started container backup
  Normal  Killing    8s    kubelet            Stopping container backup
</code></pre>
<p>kubectl logs pod/jenkins-jenkins</p>
<pre><code>...
Defaulted container &quot;jenkins-master&quot; out of: jenkins-master, backup
+ '[' '' == true ']'
+ echo 'To print debug messages set environment variable '\''DEBUG_JENKINS_OPERATOR'\'' to '\''true'\'''
+ mkdir -p /var/lib/jenkins/init.groovy.d
To print debug messages set environment variable 'DEBUG_JENKINS_OPERATOR' to 'true'
+ cp -n /var/jenkins/init-configuration/createOperatorUser.groovy /var/lib/jenkins/init.groovy.d
+ mkdir -p /var/lib/jenkins/scripts
+ cp /var/jenkins/scripts/init.sh /var/jenkins/scripts/install-plugins.sh /var/lib/jenkins/scripts
+ chmod +x /var/lib/jenkins/scripts/init.sh /var/lib/jenkins/scripts/install-plugins.sh
Installing plugins required by Operator - begin
+ echo 'Installing plugins required by Operator - begin'
+ cat
+ [[ -z '' ]]
+ install-plugins.sh
WARN: install-plugins.sh has been removed, please switch to jenkins-plugin-cli

</code></pre>
<p>kubectl describe pod/jenkins-jenkins-operator-7c4cd6dc7b-g6m7z</p>
<pre><code>  Type     Reason          Age                    From               Message
  ----     ------          ----                   ----               -------
  Normal   Scheduled       18h                    default-scheduler  Successfully assigned jenkins/jenkins-jenkins-operator-7c4cd6dc7b-g6m7z to minikube
  Normal   Pulled          18h                    kubelet            Container image &quot;virtuslab/jenkins-operator:v0.7.1&quot; already present on machine
  Normal   Created         18h                    kubelet            Created container jenkins-operator
  Normal   Started         18h                    kubelet            Started container jenkins-operator
  Normal   SandboxChanged  3m56s                  kubelet            Pod sandbox changed, it will be killed and re-created.
  Warning  BackOff         3m23s                  kubelet            Back-off restarting failed container
  Normal   Pulled          3m11s (x2 over 3m55s)  kubelet            Container image &quot;virtuslab/jenkins-operator:v0.7.1&quot; already present on machine
  Normal   Created         3m11s (x2 over 3m55s)  kubelet            Created container jenkins-operator
  Normal   Started         3m10s (x2 over 3m55s)  kubelet            Started container jenkins-operator
</code></pre>
<p>kubectl logs jenkins-jenkins-operator-7c4cd6dc7b-g6m7z</p>
<pre><code>2022-11-22T20:00:50.544Z        DEBUG   controller-jenkins      Jenkins HTTP Service is present {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:50.545Z        DEBUG   controller-jenkins      Jenkins slave Service is present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:50.545Z        DEBUG   controller-jenkins      Kubernetes resources are present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:50.545Z        DEBUG   controller-jenkins      Jenkins master pod is present   {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:50.545Z        DEBUG   controller-jenkins      Jenkins master pod is terminating       {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.546Z        DEBUG   controller-jenkins      Reconciling Jenkins     {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.546Z        DEBUG   controller-jenkins      Operator credentials secret is present  {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.552Z        DEBUG   controller-jenkins      Scripts config map is present   {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.555Z        DEBUG   controller-jenkins      Init configuration config map is present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.562Z        DEBUG   controller-jenkins      Base configuration config map is present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.562Z        DEBUG   controller-jenkins      GroovyScripts Secret and ConfigMap added watched labels {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.562Z        DEBUG   controller-jenkins      ConfigurationAsCode Secret and ConfigMap added watched labels   {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.562Z        DEBUG   controller-jenkins      createServiceAccount with annotations map[]     {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.582Z        DEBUG   controller-jenkins      Service account, role and role binding are present      {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.582Z        DEBUG   controller-jenkins      Extra role bindings are present {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.583Z        DEBUG   controller-jenkins      Jenkins HTTP Service is present {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.584Z        DEBUG   controller-jenkins      Jenkins slave Service is present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.585Z        DEBUG   controller-jenkins      Kubernetes resources are present        {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.585Z        DEBUG   controller-jenkins      Jenkins master pod is present   {&quot;cr&quot;: &quot;jenkins&quot;}
2022-11-22T20:00:55.585Z        DEBUG   controller-jenkins      Jenkins master pod is terminating       {&quot;cr&quot;: &quot;jenkins&quot;}
</code></pre>

somerandomdrunkcoder
<p>I don't see any issue in the logs you shared. You may try to install Jenkins using helm chart and not operator.</p>
<p>I summarized how to do that in <a href="https://www.rokpoto.com/jenkins-docker-in-docker-agent/" rel="nofollow noreferrer">Jenkins Docker in Docker Agent</a> post. You may read about using Docker in Jenkins pipelines there as well.</p>
