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,214 times
7
1 Answers
9
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,366
- 2
- 35
- 62
docker build: omission of dockerfiles. Where to put this answer? – 030 Sep 08 '17 at 12:41