使用URL github.com/creack/docker-firefox 的 Dockerfile 创建镜像。
docker build github.com/creack/docker-firefox
----------------- tag
docker tag : 标记本地镜像,将其归入某一仓库。
语法
docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
复制代码
实例
将镜像ubuntu:15.10标记为 runoob/ubuntu:v3 镜像。
root@runoob:~# docker tag ubuntu:15.10 runoob/ubuntu:v3
root@runoob:~# docker images runoob/ubuntu:v3
REPOSITORY TAG IMAGE ID CREATED SIZE
runoob/ubuntu v3 4e3b13c8a266 3 months ago 136.3 MB
[root@localhost docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
daocloud.io/centos 6.6 3d7ac13b921a 9 weeks ago 202.6 MB
docker.io/centos centos7.1.1503 fbe8925ecf55 9 weeks ago 212.1 MB
daocloud.io/centos latest 196e0ce0c9fb 3 months ago 196.6 MB
[root@localhost docker]# docker tag daocloud.io/centos daocloud.io/centos:news
[root@localhost docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
daocloud.io/centos 6.6 3d7ac13b921a 9 weeks ago 202.6 MB
docker.io/centos centos7.1.1503 fbe8925ecf55 9 weeks ago 212.1 MB
daocloud.io/centos latest 196e0ce0c9fb 3 months ago 196.6 MB
daocloud.io/centos news 196e0ce0c9fb 3 months ago 196.6 MB
[root@localhost docker]#