diff --git a/docs/install-packer.md b/docs/install-packer.md new file mode 100644 index 0000000..69d1dba --- /dev/null +++ b/docs/install-packer.md @@ -0,0 +1,24 @@ +# Install Hashicorp Packer on Ubuntu 22.04 + +``` +# Add Hashicorp's official GPG key +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg +sudo install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/hashicorp.gpg +sudo chmod a+r /etc/apt/keyrings/hashicorp.gpg + +# Add the repository to Apt sources +echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" main" | \ + sudo tee /etc/apt/sources.list.d/hashicorp.list > /dev/null +sudo apt-get update + +# To install the latest version +sudo apt install packer + +# Verify the install +$ packer version +Packer v1.9.4 +```