There is no need to install the image from scratch, I found this answer where you can make docker to download the desired version and I adapted to my needs:
sudo docker run ubuntu:12.04 cat /etc/issue
returns this:
Unable to find image 'ubuntu:12.04' locally
12.04: Pulling from library/ubuntu
Downloading
...
Status: Downloaded newer image for ubuntu:12.04
Ubuntu 12.04.4 LTS \n \l
There is no need to install the image from scratch, I found this answer where you can make docker to download the desired version and I adapted to my needs:
returns this:
or alternatively you can use:
and then run that image with
to make sure in the prompt try to see the version:
PS. Dont forget to commit the changes, before exiting, otherwise are lost. First get the container id using this command:
Commit changes to the container:
Then run the container: