How install java to ubuntu on docker?
<p>I tried use docker. I install tool docker and run. I dovnload ubuntu image and run on docker. I make all by this <a href="https://docs.docker.com/docker-for-windows/" rel="noreferrer">link</a></p>

<p>For install ubuntu I used <code>docker run -it ubuntu bash</code></p>

<p>After that I run this ubuntu  <code>docker run -i -t ubuntu:latest /bin/bash</code></p>

<p>After start I placed <code>root@9bca9a2a537d:/#</code></p>

<p>Now I want install java and start some app on this java. </p>

<p>I tried install java <code>root@cf50a6fdfc10:/# apt-get install default-jre</code></p>

<p>When this installed i try run this command <code>java -version</code> and I see </p>

<pre><code>root@2e62f448f783:/# java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
</code></pre>

<p>after that i exit from ubuntu</p>

<pre><code>root@2e62f448f783:/# exit
</code></pre>

<p>and run again. And when ubuntu started i try </p>

<pre><code>root@20cefe55e2eb:/# java -version
bash: java: command not found
</code></pre>

<p>How can I install java or start this java version?</p>