title: does docker always need an operating system as base image
body: <p>I have heard that docker doesn't need a separate os in linux, because it shares with the host os, but in hyper-v Windows it can run Windows OS because it can hyper a linux virtual machine so run linux software on it.</p>
  
  <p>But, I get confused about the <code>FROM</code> stage in the dockerfile, all guides said like this:</p>
  
  <pre class="lang-sh prettyprint-override"><code>FROM ubuntu:18.04
  cp . /usr/local/bin
  RUN make
  CMD /usr/local/bin/youapp
  </code></pre>
  
  <p>I can understand this step, first you need an OS, then you deploy your application; finally you run your app or whatever.</p>
  
  <p>But what does the FROM stage really mean?</p>
  
  <p>Does it always need an OS? Does nginx docker image have an os in it?</p>
  
  <p>If i want to build my own app, I write it, I compile it, I run it; but does my own app need an OS?  If not, what should I write in the FROM stage?</p>
  
  <p>i got this picture, it said docker container does not need os,but use the host os,now docker build always need an os
  <a href="https://i.stack.imgur.com/AofsM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AofsM.png" alt="enter image description here"></a></p>