title: How to run docker image in Kubernetes pod?
body: <p>How can I run a docker image in a kubernetes pod?</p>
  
  <p>A teammate of mine has defined a new docker image and pushed it to my team's private registry. I own some code running in our kubernetes cluster and we need to get my code to effectively <code>docker run gcr.io/our-project/teammates-image:latest</code>. </p>
  
  <p>I've been looking at enabling docker-in-docker on our kubernetes pods but I'm having little luck. I'm currently experimenting with <code>minikube</code> and whenever I try to <code>docker run</code> I get: <code>docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.</code>. </p>
  
  <p>I've added
  <code>
  securityContext:
    privileged: true
  </code></p>
  
  <p>To my container spec. I suspect I need more configuration but haven't figured out what.</p>
  
  <p>I'm also trying to evaluate whether I can <code>kubectl run --image=gcr.io/our-project/teammates-image:lastest</code> from within the kubernetes pod. </p>
  
  <p>Is there a "correct" way to run docker images from within a kubernetes pod? How can I run image with docker-in-docker? </p>