Can someone please explain the advantages/disadvantages using the following when building container images, rather than using the dockerfile.
Packer - tool for creating machine and container images for multiple platforms from a single source configuration
Dockramp - A Client-driven Docker Container Image Builder
Docker is a system for building, distributing and running OCI images as containers. Containers can be run on Linux and Windows. Packer is an automated build system to manage the creation of images for containers and virtual machines. It outputs an image that you can then take and run on the platform you require.
The docker Packer builder builds Docker images using Docker. The builder starts a Docker container, runs provisioners within this container, then exports the container for reuse or commits the image. Packer builds Docker containers without the use of Dockerfiles.
🐳 Use the same Dockerfile for both local development and production with multi-stage builds. If you haven't read my previous post on how to use Docker for local development. I highly recommend you read it before this.
Packer is a tool that initially was created to create AWS AMIs or base VM images in AWS. 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. It was developed by Hashicorp but it's open source.
Dockramp is an alternative to using docker build
it uses the same
Dockerfile
that docker build
would use but with some additional
enhancements. For example, it can use accept
heredocs in the RUN
command for multiple line bash commands.
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. 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.
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.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With