0
$ sudo docker images     

REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              13.10               9f676bd305a4        9 days ago          178 MB
ubuntu              saucy               9f676bd305a4        9 days ago          178 MB
ubuntu              raring              eb601b8965b8        9 days ago          166.5 MB
ubuntu              13.04               eb601b8965b8        9 days ago          166.5 MB
ubuntu              12.10               5ac751e8d623        9 days ago          161 MB
ubuntu              quantal             5ac751e8d623        9 days ago          161 MB
ubuntu              10.04               9cc9ea5ea540        9 days ago          180.8 MB
ubuntu              lucid               9cc9ea5ea540        9 days ago          180.8 MB
ubuntu              12.04               9cd978db300e        9 days ago          204.4 MB
ubuntu              latest              9cd978db300e        9 days ago          204.4 MB
ubuntu              precise             9cd978db300e        9 days ago          204.4 MB

$ sudo docker run -i -t ubuntu /bin/bash
  1. What image I will run when I say 'run ubuntu' ?
  2. Can I run image by repository and tag ? Something like $ sudo docker run -i -t ubuntu 12.04 /bin/bash ?

Thanks

1

When you don't specify tag, "latest" should be used. You can specify tag or image id as name with colon separator:

# tag
sudo docker run -i -t ubuntu:13.04 /bin/bash
# image id
sudo docker run -i -t ubuntu:5ac751e8d623 /bin/bash
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.