34 lines
537 B
YAML
34 lines
537 B
YAML
%YAML 1.2
|
|
---
|
|
version: 1.1
|
|
|
|
build:
|
|
hcl_type: block
|
|
|
|
name: learn-packer
|
|
|
|
sources:
|
|
- source.docker.ubuntu
|
|
- source.docker.ubuntu-focal
|
|
|
|
provisioner:
|
|
hcl_type: block
|
|
|
|
shell_1:
|
|
hcl_type: label
|
|
hcl_name: shell
|
|
|
|
environment_vars:
|
|
- FOO=hello world
|
|
|
|
inline:
|
|
- echo Adding file to Docker Container
|
|
- "echo \"FOO is $FOO\" > example.txt"
|
|
|
|
shell_2:
|
|
hcl_type: label
|
|
hcl_name: shell
|
|
|
|
inline:
|
|
- echo Running ${var.docker_image} Docker image.
|
|
...
|