In addition to using the Dockerfile, you can also make a Docker image in a more intuitive way.
1. Run basic image container
Logged into Ubuntu as the root user.
docker run -it ubuntu
root@0bab204d8f9b:/#
Install required software in Ubuntu, for example:
apt-get install python -y
apt-get install openjdk-7-jdk
....
Exit from Ubuntu after installing software.
exit
2. Make an image
Find the ID of the required container, for example, 41570524e867.
docker ps -n 1 # List latest containers.
docker commit 41570524e867 myubuntu
Run the following command to check whether the image is made successfully.
docker images