<p>I'm trying to run my custom Jenkins on Openshift. I'm trying to run dockerized pipelines using privileged containers and scc to be able to run docker using my Jenkins. So far, I managed to run the job and it is creating a new Docker container successfully. But, since my new docker is created by Jenkins it doesn't have access to Nexus service on my project. How can I fix this? I was thinking the solution should be for the Jenkins to run docker in the same namespace as my Jenkins.</p>

AmirMV
<p>I'm assuming that you want to run your container in Kubernetes.</p>

<p>On your <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer">Deployment</a> I would advise using either a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">ConfigMap</a> or if you want to keep in encrypted in the cluster you can use a <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer">Secret</a> to store your Nexus credentials.</p>

<p>Then you can mount your ConfigMap or Secret under <code>~/.ivy2/.credentials</code> for example.</p>
