简体   繁体   English

Packer、Dockramp 与 Dockerfile

[英]Packer, Dockramp vs Dockerfile

Can someone please explain the advantages/disadvantages using the following when building container images, rather than using the dockerfile.有人可以在构建容器映像时使用以下内容而不是使用 dockerfile 来解释优点/缺点吗?

  1. Packer - tool for creating machine and container images for multiple platforms from a single source configuration Packer - 用于从单个源配置为多个平台创建机器和容器映像的工具

  2. Dockramp - A Client-driven Docker Container Image Builder Dockramp - 客户端驱动的 Docker 容器映像生成器

  1. Packer is a tool that initially was created to create AWS AMIs or base VM images in AWS. Packer 是一种最初创建的工具,用于在 AWS 中创建 AWS AMI 或基础 VM 映像。 It has been extended to be used with containers, a lot of different Virtualization software such as VMware , KVM/QEMU , and other cloud/IaaS providers like DigitalOcean .它已扩展为可与容器、许多不同的虚拟化软件(如VMwareKVM/QEMU )以及其他云/IaaS 提供商(如DigitalOcean)一起使用 It was developed by Hashicorp but it's open source.它由Hashicorp开发,但它是开源的。

  2. Dockramp is an alternative to using docker build it uses the same Dockerfile that docker build would use but with some additional enhancements. Dockramp是使用替代docker build它使用相同的Dockerfiledocker build将使用但也有一些其他增强功能。 For example, it can use accept heredocs in the RUN command for multiple line bash commands.例如,对于多行 bash 命令,它可以在RUN命令中使用 accept heredocs

Docker/LXC is fairly fast but the main advantage of building images (and this applies to Virtualization images too) is that you can have a fully installed application or application stack from the get-go. Docker/LXC 相当快,但构建镜像的主要优势(这也适用于虚拟化镜像)是您可以从一开始就拥有完全安装的应用程序或应用程序堆栈。 This tends to work better in autoscaling environments because it takes less time for your application to start servicing traffic either in a container or VM.这在自动缩放环境中往往效果更好,因为您的应用程序开始为容器或 VM 中的流量提供服务所需的时间更少。

When you are creating your docker image all the time with your Dockerfile it needs to run a series of steps before becoming 'ready', hence it might take longer to start servicing traffic.当您一直使用 Dockerfile 创建 docker 映像时,它需要在“准备好”之前运行一系列步骤,因此开始为流量提供服务可能需要更长的时间。

Hope it helps.希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM