Answers: <p>You can take a look at <a href="http://docs.podman.io/en/latest/index.html" rel="nofollow noreferrer">podman</a>, is like run docker but without the need of a daemon.</p>
  <p>You can also check <a href="https://github.com/containers/buildah/blob/main/README.md" rel="nofollow noreferrer">buildah</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2021-08-10T02:35:04.497Z
Answers: Thanks for the answer,  I tried podman but only con was it doesn't support cache. That makes build slower.
Answers: Rocky Hai
Answers: CC BY-SA 4.0
Answers: 2021-08-06T18:28:48.300Z
Answers: 2021-08-06T18:28:48.300Z
Answers: Joao  Vitorino
Body: <p>Kubernetes 1.20 moved from docker to CRI-O as container runtime. I have a scenario where my Jenkins run on kubernetes and does docker build my dockerfile .But the build breaks as docker daemon is not available now.
  I tried using Kaniko to build image but the downfall was once image is built i have no chance to scan the image before pushing to container registry. Once the image is built i have to push it immediately. How can i scan it before pushing to registry.</p>
  <p>Current process:</p>
  <ol>
  <li>Jenkins runs on Kubernetes.</li>
  <li>Pulls code and does the docker build and tag it.</li>
  <li>Once docker build is successful will a scan the image for vulnerabilities.</li>
  <li>Once scan passes we push to the container registry.</li>
  </ol>
  <p>With Kaniko i can do till step 2 later image goes away I am not able to find the image locally but i can push directly. And pull it and do scan. Any suggestions or alternatives so i can use my old dockerfiles build,scan and push without major changes</p>
  
Comments: CC BY-SA 4.0
Comments: 2021-11-18T22:23:08.947Z
Comments: What was your solution to this? I'm in the same situation now
Comments: hhaslam11
Tags: <docker><jenkins><kubernetes>
Title: How to do docker build image from dockerfile on Kubernetes 1.20
UserDisplayName: Rocky Hai
ThreadText: # How to do docker build image from dockerfile on Kubernetes 1.20
  
  (Asked by: username_0 on 2021-08-06)
  
  Kubernetes 1.20 moved from docker to CRI-O as container runtime. I have a scenario where my Jenkins run on kubernetes and does docker build my dockerfile .But the build breaks as docker daemon is not available now.
  I tried using Kaniko to build image but the downfall was once image is built i have no chance to scan the image before pushing to container registry. Once the image is built i have to push it immediately. How can i scan it before pushing to registry.
  
  Current process:
  
  1. Jenkins runs on Kubernetes.
  2. Pulls code and does the docker build and tag it.
  3. Once docker build is successful will a scan the image for vulnerabilities.
  4. Once scan passes we push to the container registry.
  
  With Kaniko i can do till step 2 later image goes away I am not able to find the image locally but i can push directly. And pull it and do scan. Any suggestions or alternatives so i can use my old dockerfiles build,scan and push without major changes
  
  **Tags:** docker, jenkins, kubernetes
  
  > **Comments:**
  > **username_1**: What was your solution to this? I'm in the same situation now  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-08-06. Score: 1
  
  You can take a look at [podman](http://docs.podman.io/en/latest/index.html), is like run docker but without the need of a daemon.
  
  You can also check [buildah](https://github.com/containers/buildah/blob/main/README.md)
  
  > **Comments:**
  > **username_0**: Thanks for the answer,  I tried podman but only con was it doesn't support cache. That makes build slower.  
  
  ---
  
  