I tried use docker. I install tool docker and run. I dovnload ubuntu image and run on docker. I make all by this link
For install ubuntu I used docker run -it ubuntu bash
After that I run this ubuntu docker run -i -t ubuntu:latest /bin/bash
After start I placed root@9bca9a2a537d:/#
Now I want install java and start some app on this java.
I tried install java root@cf50a6fdfc10:/# apt-get install default-jre
When this installed i try run this command java -version and I see
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)
after that i exit from ubuntu
root@2e62f448f783:/# exit
and run again. And when ubuntu started i try
root@20cefe55e2eb:/# java -version
bash: java: command not found
How can I install java or start this java version?
Dockerfilethat starts with the base Ubuntu image you want, installs Java, copies across your app and sets it up to run.Dockerfilereference)? You supply a list of steps that tells Docker how to build the container you want, then it's easily repeatable, rather than having to set it up in a running machine. See e.g. github.com/textbook/flash/blob/master/Dockerfile, from one of my own projects.