amazon-web-services - 需要从AWS中已安装应用程序的机器拍摄Docker镜像或容器的镜像

标签 amazon-web-services docker ansible-2.x

当我在docker上工作时,我需要帮助来从现有AWS盒子中取出容器或图像。在我的AWS框中,我们的应用程序已安装并启动。

对于我们的应用程序初始化,这需要更多时间。所以我想在盒子启动时自己部署这个容器(已安装应用程序)。根据我的理解,当我使用Docker容器时,它将启动我的应用程序。这样我就可以节省应用程序的初始化时间。

我正在通过AWS VPC中的ansible启动计算机。所以我可以在那里叫docker容器。

任何人都可以帮忙此 Activity 。

谢谢
Ezhilmurugan M I

最佳答案

如果您使用标签将更改docker commit编码为图像,则可以推送到注册表,然后将图像下拉到另一台服务器上。

$ docker commit <hash or name> yourusername/red_panda
$ docker push yourusername/red_panda

在其他主机上
$ docker pull yourusername/red_panda

您也可以导出图像,按需要进行传输,然后将图像导入新服务器。
$ docker export red_panda > latest.tar
$ cat latest.tgz | docker import - exampleimagelocal:new

关于amazon-web-services - 需要从AWS中已安装应用程序的机器拍摄Docker镜像或容器的镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37043336/

相关文章:

docker - 主机上的卷 - Postgres (Mac OS) 的权限被拒绝

ansible - 在ansible中如何在文件末尾添加一个文本 block ,标记前有一个空行?

python - 带有 ipython 笔记本的 Amazon ec2 实例

ruby-on-rails - Aws::CognitoIdentity::Errors::NotAuthorizedException 异常:无效的登录 token

python - 文件未找到错误 : [Errno 2] No such file or directory + os.

amazon-web-services - 尝试在ECS实例中使用AWS ECR中提到的登录命令时出错

python - 从 Action 插件调用过滤器插件

ansible - 仅在特定组的盒子上运行 Ansible 任务

amazon-web-services - 使用 AWS AppSync 中的列表查询 DynamoDB

amazon-web-services - 如何使 AWS API 网关指向 "understand"尾部斜杠?