Skip to content

Commit

Permalink
Merge pull request #48 from theohbrothers/docs/readme-add-info-about-…
Browse files Browse the repository at this point in the history
…packer-configuation-via-environment-variables

Docs (readme): Add info about packer configuation via environment variables
  • Loading branch information
leojonathanoh authored Jul 9, 2023
2 parents f78f4da + 7a212a1 commit 115ac23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Dockerized [`packer`](https://github.com/hashicorp/packer) with useful tools.

## Usage

Packer [configuration](https://developer.hashicorp.com/packer/docs/configure#configuring-packer) can be done via `.packerconfig` config file or environment variables (e.g. `PACKER_LOG=1` for verbose logging). Environment variables are preferred when using docker.

### QEMU builder

```sh
Expand Down Expand Up @@ -67,7 +69,7 @@ See examples:
docker run --rm -it \
-v $(pwd):/src \
-w /src \
theohbrothers/docker-packer:1.7.7-sops-ubuntu-20.04 sh -c 'packer --version && packer build template.json'
theohbrothers/docker-packer:1.7.7-sops-ubuntu-20.04 packer build template.json'
```
## Development
Expand Down
4 changes: 3 additions & 1 deletion generate/templates/README.md.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ $(
@"
## Usage
Packer [configuration](https://developer.hashicorp.com/packer/docs/configure#configuring-packer) can be done via ``.packerconfig`` config file or environment variables (e.g. ``PACKER_LOG=1`` for verbose logging). Environment variables are preferred when using docker.
### QEMU builder
``````sh
Expand Down Expand Up @@ -77,7 +79,7 @@ See examples:
docker run --rm -it \
-v `$(pwd):/src \
-w /src \
theohbrothers/docker-packer:$( $VARIANTS | ? { $_['tag'] -notmatch '\bqemu|virtualbox\b' } | Select-Object -First 1 | % { $_['tag'] } ) sh -c 'packer --version && packer build template.json'
theohbrothers/docker-packer:$( $VARIANTS | ? { $_['tag'] -notmatch '\bqemu|virtualbox\b' } | Select-Object -First 1 | % { $_['tag'] } ) packer build template.json'
``````
Expand Down

0 comments on commit 115ac23

Please sign in to comment.