2025-04-22 16:28:31 +02:00
2025-04-22 16:28:31 +02:00
2025-04-21 17:31:12 +02:00
2025-04-22 15:42:18 +02:00
2025-04-22 15:42:18 +02:00
2025-04-22 14:12:07 +02:00
2025-04-22 16:22:05 +02:00
2025-04-22 15:42:18 +02:00

Terraform Docker Packer

This Terraform module serves as an abstraction to builds machine images from Packer configurations through Docker.
A pre-existing Docker image with Packer installed is required.

You may run the example to build a RaspiOS ARM64 image:

pushd examples/raspios
    terraform init
    terraform apply
    docker logs -f $(docker ps -q -f name=packer-builder-arm)
popd

Build Progress

The build runs in the background and outpout the image to the local directory.
To see the build progress, you need to show the Docker logs like this:

docker logs -f $(docker ps -q -f name=packer-builder-arm)

Requirements

Name Version
docker ~> 3.0.1

Providers

Name Version
docker 3.0.2
local 2.5.2

Modules

No modules.

Resources

Name Type
docker_container.packer resource
docker_image.packer resource
local_file.packer_variables resource

Inputs

Name Description Type Default Required
packer_config n/a string n/a yes
packer_image n/a string "mkaczanowski/packer-builder-arm:latest" no
packer_variables n/a any n/a yes

Outputs

No outputs.

Description
Terraform module for running Packer through Docker
Readme 84 KiB
Languages
HCL 55.7%
Shell 44.3%