2016年3月10日 星期四

[ 常見問題 ] Docker how to change repository name or rename image?

Source From Here 
Question 
I'm trying to change repository name of the image: 
  1. REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE  
  2. server              latest              d583c3ac45fd        26 minutes ago      685.5 MB  
Hence I want to change the name server to something like myname/server
  1. REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE  
  2. myname/server       latest              d583c3ac45fd        26 minutes ago      685.5 MB  
How can I do this? 

How-To 
Using docker command tag



which means you can: 

# docker tag server:latest myname/server:latest

Or using image id: 
# docker tag d583c3ac45fd myname/server:latest

Tags are just human-readable aliases for the full image name (d583c3ac45fd...). So you can have as many of them associated with the same image as you like. If you don't like the old name you can remove it after you've retagged it by docker command rmi
# docker rmi server

That will just remove the alias/tag. Since d583c3ac45fd has other names, the actual image won't be deleted.

沒有留言:

張貼留言

[ Java 文章收集 ] 局部敏感哈希 (Locality-Sensitive Hashing, LSH) 方法介紹

Source From  Here   Preface   本文主要介紹一種用於海量高維數據的近似最近鄰快速查找技術—— 局部敏感哈希  ( Locality-Sensitive Hashing, LSH ),內容包括了 LSH 的原理、LSH 哈希函數集、以及 LSH 的一...