I have read https://www.packer.io/docs/builders/docker.html, but I do not see the advantage of using Packer over docker build or docker-compose up --build for building docker images
Asked
Active
Viewed 5,682 times
1 Answers
10
Mainly the reason is to keep your image building steps intact if you get to move from docker to another image building system.
Packer does support a bunch of providers (builders in packer terminology), and changing the target "container" is just a matter of changing the builder (or using multiple builders in the same packer file), the build steps (provisionner step) are kept intact and will be the same if you build a docker image or an AWS ami for example (you can even build both at the same time).
Tensibai
- 11,416
- 2
- 37
- 63