在Dockerhub上下载,上传并标注自己的image
来源:互联网 发布:重庆仙桃数据谷 编辑:程序博客网 时间:2024/05/14 04:26
首先注册Dockerhub,创建repository
Username:daisyhxj
Passwd :
步骤一:tag and push the image,可以在本地看到标注自己的hello-world image
root@ubuntu-daisy:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest c54a2cc56cbb 10 weeksago 1.848 kB
root@ubuntu-daisy:~# docker tag c54a2cc56cbb daisyhxj/hello-world:latest
root@ubuntu-daisy:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
daisyhxj/hello-world latest c54a2cc56cbb 10 weeksago 1.848 kB
hello-world latest c54a2cc56cbb 10 weeksago 1.848 kB
docker tag命令格式:
1. Tells your operating system you are using the docker program
2.A subcommand that tags an image
3.The image ID
4.Your account name from Docker Hub / The image name : Version label or tag
1.docker 2.tag 3. c54a2cc56cbb 4. daisyhxj/hello-world:latest
步骤二: 在本地login Dockerhub
root@ubuntu-daisy:~# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.comto create one.
Username : daisyhxj
Password:
Login Succeeded
步骤三: push image 到Dockerhub repository
root@ubuntu-daisy:~# docker push daisyhxj/hello-world
The push refers to a repository[docker.io/daisyhxj/hello-world]
a02596fdd012: Mounted from library/hello-world
latest: digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4size: 524
现在可以登录网上Dockerhub 查看repository ,添加了daisyhxj/hello-world这个仓库
步骤四:pull image from Dockerhub
首先删除本地的hello-world image 及daisyhxj/hello-world image , 若要执行它,可以从hub上download
root@ubuntu-daisy:~# docker stop $(docker ps -a -q)
root@ubuntu-daisy:~# docker rmi -f c54a2cc56cbb
root@ubuntu-daisy:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
root@ubuntu-daisy:~# docker run daisyhxj/hello-world
Unable to find image 'daisyhxj/hello-world:latest' locally
latest: Pulling from daisyhxj/hello-world
c04b14da8d14: Pull complete
Digest:sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4
Status: Downloaded newer image for daisyhxj/hello-world:latest
Hello from Docker!
This message shows that your installation appears to beworking correctly.
成功从hub上下载下来并执行
- 在Dockerhub上下载,上传并标注自己的image
- docker创建镜像并上传dockerhub
- 怎么在地图上标注自己的店铺
- 怎么在地图上标注自己的店铺
- 百度地图API:如何查询数自己的数据库标注地图并让标注显示在最佳视野内
- 百度地图API:如何查询数自己的数据库标注地图并让标注显示在最佳视野内
- 百度地图API:如何查询数自己的数据库标注地图并让标注显示在最佳视野内
- 从Docker Hub上下载Image并修改Image的Repository属性
- 创建自己的Pod库并上传到CocoaPod上
- 制作自己的pods 并上传到cocopods上
- docker系列之三 :创建自己的image并上传到docker hub
- 关于运用高德地图api,并在api上显示标注的小应用
- 在linux服务器上部署自己的git库,并配置IDEA上传项目到git库
- 如何在百度地图上标注宾馆饭店(矢量点标注)并导出为图片
- 初学者怎么在github上上传自己的项目
- 如何在Github上上传自己的项目
- 怎样在github上上传自己的源码
- 怎样在百度地图上标注上自己公司的名称使别人能在搜索百度地图的同时在地图上能看见本公司地址?
- 欢迎使用CSDN-markdown编辑器
- Android 检查当前网络常用例子
- 常用集合用法及区别
- 对栈的操作和算法实现
- 怎样在一张图片上叠加另一张图片
- 在Dockerhub上下载,上传并标注自己的image
- NSDataDetector是NSRegularExpression的子类NSDataDetector和NSTextCheckingResult的使用
- hibernate入门实例(一)
- UIImageView帧动画相关属性和方法和UIImage的2中加载方法
- Laravel5:tokenmismatchexception报错
- [openwrt] uci 的shell和lua接口
- 使用socket建立长连接
- Toolbar那些用法
- OpenCV+Tesseract进行OCR学习(一)文字提取