博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在Docker Hub上共享Docker映像
阅读量:2508 次
发布时间:2019-05-11

本文共 2093 字,大约阅读时间需要 6 分钟。

An image like the one we created in the is simple, yet it’s a perfect example to try one of the cool features of Docker, provided through Docker Hub, the official hosting service of public and private Docker Images.

像我们在创建的图像一样简单,但它是尝试通过Docker Hub提供的Docker酷功能之一的完美示例,Docker Hub是公共和私有的官方托管服务Docker映像。

Before we can do that, however, we need to register on Docker Hub.

但是,在此之前,我们需要在Docker Hub上注册。

Docker Hub is free in its basic plan which includes unlimited public repos and one private repo. For more than that, there are paid plans.

Docker Hub是免费的基本计划,其中包括无限的公共存储库和一个私有存储库。 不仅如此,还有付费计划。

Once you register and login, you will see your dashboard:

注册并登录后,您将看到仪表板:

Now using your username, you need to login from the command line using docker login:

现在使用您的用户名,您需要使用docker login从命令行docker login

docker login --username 

Now you can use docker tag to create the image, and docker push to push it to Docker Hub:

现在,您可以使用docker tag创建映像,然后使用docker push其推送到Docker Hub:

docker tag  
/
docker push
/

If you forget to login, you will get a denied: requested access to the resource is denied error message when you run docker push.

如果您忘记登录,则会得到denied: requested access to the resource is denied运行docker push时, denied: requested access to the resource is denied错误消息。

Now you should see your image on the repositories list in Docker Hub:

现在,您应该在Docker Hub的存储库列表中看到您的映像:

Click on it to reveal more details:

单击它以显示更多详细信息:

Now since the image is public, everyone can use it to create their own containers, or use it as a base image.

现在,由于图像是公开的,因此每个人都可以使用它来创建自己的容器,或将其用作基础图像。

You can now create a new tag, making a new version of the image, and there’s a lot more you can do that I won’t go into now, like:

现在,您可以创建一个新标签,以创建该图像的新版本,并且您可以做的很多事情我都不会涉及,例如:

  • automated builds of images from external repositories (like GitHub)

    从外部存储库(例如GitHub)自动构建图像
  • running automated tests

    运行自动化测试
  • setting up webhooks to perform any action when a repository image is updated

    设置Webhooks以在更新存储库映像时执行任何操作
  • creating organizations and teams within them

    在其中建立组织和团队

翻译自:

转载地址:http://jxmgb.baihongyu.com/

你可能感兴趣的文章
一个异步网络请求的坑:关于NSURLConnection和NSRunLoopCommonModes
查看>>
iOS 如何放大按钮点击热区
查看>>
ios设备唯一标识获取策略
查看>>
获取推送通知的DeviceToken
查看>>
Could not find a storyboard named 'Main' in bundle NSBundle
查看>>
CocoaPods安装和使用教程
查看>>
Beginning Auto Layout Tutorial
查看>>
block使用小结、在arc中使用block、如何防止循环引用
查看>>
iPhone开发学习笔记002——Xib设计UITableViewCell然后动态加载
查看>>
iOS开发中遇到的问题整理 (一)
查看>>
为什么你的App介绍写得像一坨翔?
查看>>
RTImageAssets插件--@3x可自动生成@2x图片
查看>>
iOS开发的一些奇巧淫技
查看>>
docker容器秒死的解决办法
查看>>
Linux(SUSE 12)安装jboss4并实现远程访问
查看>>
Neutron在给虚拟机分配网络时,底层是如何实现的?
查看>>
netfilter/iptables全攻略
查看>>
Overlay之VXLAN架构
查看>>
Eclipse : An error occurred while filtering resources(Maven错误提示)
查看>>
在eclipse上用tomcat部署项目404解决方案
查看>>