Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Script and Docker container for installing @hashicorp tools

Notifications You must be signed in to change notification settings

sethvargo/hashicorp-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashiCorp Installer

HashiCorp Installer is a script and accompanying Docker image that downloads, verifies, and installs HashiCorp tools from the HashiCorp releases service.

Features:

  • GPG import and verification - automatically imports HashiCorp's GPG key and verifies the download integrity and signature

  • Docker container - includes a Docker contain which can be used as a standalone way to install or can be used as a multi-stage pre-build container.

Usage

The general syntax is:

$ install-hashicorp-tool NAME VERSION [OS=linux [ARCH=amd64]]

For example:

$ install-hashicorp-tool terraform 0.11.7

Standalone Installer

The tool can be used as a standalone installer:

$ docker run -v $(pwd):/software sethvargo/hashicorp-installer terraform 0.11.7

Multi-Stage Builder

The tool can also be used as part of a multi-stage Docker build:

# Download and verify the integrity of the download first
FROM sethvargo/hashicorp-installer AS installer
RUN /install-hashicorp-tool "terraform" "0.11.7"

# Now copy the binary over into a smaller base image
FROM alpine:latest
COPY --from=installer /software/terraform /terraform
ENTRYPOINT ["/terraform"]

FAQ

Why don't you import HashiCorp's public key from a keyserver?
A few reasons. First, then you have to trust the key server. Second, some build services don't allow outbound requests on non-80, non-443 ports. Since most keyservers don't run on those ports, it creates unreliable builds.

About

Script and Docker container for installing @hashicorp tools

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published