root@iZ28ikebrg6Z:~# docker search redmine
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
sameersbn/redmine 40 [OK]
webts/redmine Self contained Redmine 2.4 install on Cent... 2
triangle/redmine-plugin-dev Redmine 2.4.1 on ruby 2.0 aimed at plugin ... 1 [OK]
oasis/redmine-git 1
melopos/redmine 1 [OK]
turnkeylinux/redmine-13.0 TurnKey Redmine - Integrated SCM & Project... 1
sherkenh/redmine 0
oasis/redmine 0
bernigaud/redmine Redmine for my server HAL Forked from same... 0
eprecise/redmine 0
hogefoobar/redmine 0
mattuso/redmine_nginx 0 [OK]
mattuso/redmine_mysql 0 [OK]
aofox5152/redmine 0
chonglou/redmine remine+mysql+nginx 0
laughk/redmine 0
krickwix/redmine 0
bazitov/redmine 0
sasasin/redmine-scrum ALMinium on CentOS 6, with SSH server. 0
yjkim/apache-redmine 0
sosyco/redmine-sqlite-debian Tryout/GetAndRun Redmine 2.5.1/sqlitel/De... 0
eternnoir/redminebot 0 [OK]
sosyco/redmine-mysql-debian Tryout/GetAndRun Redmine 2.5.1/mysql/Debi... 0
hiromiso/redmine2.4 redmine + mysql 0
tmtkd/redminetest Sep. 1st, 2014 test of redmine/docker 0
pvdvreede/redminedev Installation of ruby 2.0.0-p247 and others 0
madmaze/ubunturedmine quick ubuntu 12.04 image with Redmine on s... 0
shaftoe/new_redmine WARNING: old legacy Redmine, not usable fo... 0
mattuso/redmine_unicorn 0 [OK]
vpetersson/redmine 0 [OK]
miraitechno/redmine 0 [OK]
pnelson/redmine 0 [OK]
padelt/redmine 0 [OK]
binaryphile/redmine Reusable, general-purpose Redmine instance... 0
我们搜索了一下redmine,这是个项目管理的服务。上面的列 有,名字,描写叙述,星级(越流行评分越高,提供參考),是否有官方维护,是否自己主动化,这点我不是非常能理解,我也不敢误人子弟。所以还是引用官网的那句话,各位看官自己理解
“Official repositories are built and maintained by the Stackbrew project,
and Automated repositories are Automated
Builds that allow you to validate the source and content of an image.”
选一个pull下来即可了。
Building an image from a Dockerfile
通过Dockerfile来构建一个镜像。用vim写一个Dockerfile,内如例如以下:
#This is a comment
FROM ubuntu:14.04
MAINTAINER zengjinlong
RUN apt-get update && apt-get install -y ruby ruby-dev
RUN gem install sinatra
docker tag 5db5f8471261 ouruser/sinatra:develroot@iZ28ikebrg6Z:~/docker# docker tag 224b40d4b89f zengjinlong/sinatra:v3
结果显示一下,
输出:
root@iZ28ikebrg6Z:~/docker# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
zengjinlong/sinatra v3 224b40d4b89f 13 minutes ago 192.8 MB
ubuntu 14.10 2185fd50e2ca 2 days ago 237.2 MB
ubuntu utopic 2185fd50e2ca 2 days ago 237.2 MB
ubuntu trusty 9cbaf023786c 2 days ago 192.8 MB
ubuntu latest 9cbaf023786c 2 days ago 192.8 MB
ubuntu 14.04.1 9cbaf023786c 2 days ago 192.8 MB
ubuntu 14.04 9cbaf023786c 2 days ago 192.8 MB
ubuntu precise a9561eb1b190 2 days ago 120.2 MB
ubuntu 12.04.5 a9561eb1b190 2 days ago 120.2 MB
ubuntu 12.04 a9561eb1b190 2 days ago 120.2 MB
centos centos5 504a65221a38 2 weeks ago 467.1 MB
centos centos6 68edf809afe7 2 weeks ago 212.7 MB
centos centos7 87e5b6b3ccc1 2 weeks ago 224 MB
centos latest 87e5b6b3ccc1 2 weeks ago 224 MB
ubuntu quantal c5881f11ded9 3 months ago 172.2 MB
ubuntu 12.10 c5881f11ded9 3 months ago 172.2 MB
ubuntu 13.04 463ff6be4238 3 months ago 169.4 MB
ubuntu raring 463ff6be4238 3 months ago 169.4 MB
ubuntu saucy 195eb90b5349 3 months ago 184.7 MB
ubuntu 13.10 195eb90b5349 3 months ago 184.7 MB
training/webapp latest 31fa814ba25a 4 months ago 278.8 MB
ubuntu 10.04 3db9c44f4520 5 months ago 183 MB
ubuntu lucid 3db9c44f4520 5 months ago 183 MB
上传我们的镜像到docker hub里面。
root@iZ28ikebrg6Z:~/docker# docker push zengjinlong/sinatra
The push refers to a repository [zengjinlong/sinatra] (len: 1)
Sending image list
^Croot@iZ28ikebrg6Z:~/docker#
演示一下就OK,不是非常想在这里浪费时间。
删除本地镜像,由于毕竟占地方把。
root@iZ28ikebrg6Z:~/docker# docker rmi centos
Untagged: centos:latest
root@iZ28ikebrg6Z:~/docker# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
zengjinlong/sinatra v3 224b40d4b89f 18 minutes ago 192.8 MB
ubuntu 14.10 2185fd50e2ca 2 days ago 237.2 MB
ubuntu utopic 2185fd50e2ca 2 days ago 237.2 MB
ubuntu 14.04 9cbaf023786c 2 days ago 192.8 MB
ubuntu latest 9cbaf023786c 2 days ago 192.8 MB
ubuntu trusty 9cbaf023786c 2 days ago 192.8 MB
ubuntu 14.04.1 9cbaf023786c 2 days ago 192.8 MB
ubuntu 12.04.5 a9561eb1b190 2 days ago 120.2 MB
ubuntu 12.04 a9561eb1b190 2 days ago 120.2 MB
ubuntu precise a9561eb1b190 2 days ago 120.2 MB
centos centos5 504a65221a38 2 weeks ago 467.1 MB
centos centos6 68edf809afe7 2 weeks ago 212.7 MB
centos centos7 87e5b6b3ccc1 2 weeks ago 224 MB
ubuntu 12.10 c5881f11ded9 3 months ago 172.2 MB
ubuntu quantal c5881f11ded9 3 months ago 172.2 MB
ubuntu raring 463ff6be4238 3 months ago 169.4 MB
ubuntu 13.04 463ff6be4238 3 months ago 169.4 MB
ubuntu saucy 195eb90b5349 3 months ago 184.7 MB
ubuntu 13.10 195eb90b5349 3 months ago 184.7 MB
training/webapp latest 31fa814ba25a 4 months ago 278.8 MB
ubuntu lucid 3db9c44f4520 5 months ago 183 MB
ubuntu 10.04 3db9c44f4520 5 months ago 183 MB
root@iZ28ikebrg6Z:~/docker# docker rmi centos:*
Error response from daemon: No such image: centos:*
2014/10/16 15:38:58 Error: failed to remove one or more images
root@iZ28ikebrg6Z:~/docker# docker rmi centos
Error response from daemon: No such image: centos:latest
2014/10/16 15:39:03 Error: failed to remove one or more images
root@iZ28ikebrg6Z:~/docker#