Testing Packer Templates - building Docker images


#1

I have several Packer templates that I want to put under CI which leverage the Docker builder. (https://www.packer.io/docs/builders/docker.html)

To get this to work, I’m planning to build a Docker image with an installation of Packer and Docker

The implications is that I would be running Docker inside of Docker since the Docker builder requires the a running Docker Daemon

Is this supported in CircleCI 2.0 job space for the Docker executor?

(I’ve been testing this locally, and it seems I would be calling docker run --privileged my_image packer build -only=docker template.json in the primary container) Would like a heads up and advice before I go down this route. Thanks!


#2

The container would run in the remote environment so it should be fine as long as you’re not mounting volumes.


#3

Great, thank you for your prompt responses!


#4

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.