Skip to content

Instantly share code, notes, and snippets.

@abuxton
Last active February 15, 2022 14:20
Show Gist options
  • Save abuxton/b313d8e486e32045412ad3a9555c8d08 to your computer and use it in GitHub Desktop.
Save abuxton/b313d8e486e32045412ad3a9555c8d08 to your computer and use it in GitHub Desktop.
hashicorp packages list with docker gist

Hashicorp_package_bootstrap

A helper to run through docker to review available packages available as native *nix packages.

requirments

requires docker requires network connection

usage

git clone https://gist.github.com/abuxton/b313d8e486e32045412ad3a9555c8d08 hashicorp_package_bootstrap && cd hashicorp_package_bootstrap

❯ ls ./
      README.MD
      centos-rhel.sh
      ubuntu.sh
    
```shell
# pick one. 
bash ./ubuntu.sh
#!/usr/bin/env bash
# run centos in docker long form so you have a clue
docker pull centos:centos7.9.2009
docker run --name centos_bash -d -it centos bash
#docker ps
# docker exec -it centos
# commands to run inside docker exec
docker exec centos_bash yum install yum-utils -y
# docker exec centos_bash dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
docker exec centos_bash yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
docker exec centos_bash yum search vault
docker exec centos_bash yum list --showduplicates vault-enterprise
docker exec centos_bash yum list --showduplicates vault-*
docker exec centos_bash yum list --showduplicates consul-*
docker exec centos_bash yum list --showduplicates nomad-*
docker exec centos_bash yum list --showduplicates boundary*
#!/usr/bin/env bash
# same again ubuntu
docker pull ubuntu:latest
docker run --name ubuntu_bash -d -i -t ubuntu bash
# execute the following in ubuntu
#containers are light so need stuff
docker exec ubuntu_bash apt update -y && apt upgrade -y
docker exec ubuntu_bash apt install curl -y
# needs region and city base set
docker exec ubuntu_bash apt-get install -y software-properties-common
docker exec ubuntu_bash apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
docker exec ubuntu_bash apt update --allow-insecure-repositories
docker exec ubuntu_bash apt list -a *-enterprise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment