Skip to content

Instantly share code, notes, and snippets.

@bernard-wagner
Last active November 15, 2017 14:04
Show Gist options
  • Save bernard-wagner/11888223da126f208c7c52e3f8bd8384 to your computer and use it in GitHub Desktop.
Save bernard-wagner/11888223da126f208c7c52e3f8bd8384 to your computer and use it in GitHub Desktop.
Alpine - Hashicorp Vault
#!/bin/sh
export GOROOT=/usr/lib/go/
export GOPATH=/root/go
export VAULT_SRC_PATH=$GOPATH/src/github.com/hashicorp/vault
export PATH=$PATH:$GOPATH/bin
apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/main musl-dev make git bash
apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/community go
mkdir -p $GOPATH
git clone https://github.com/hashicorp/vault $VAULT_SRC_PATH
cd $VAULT_SRC_PATH
make bootstrap && make
# Install vault to /usr/loca/bin
cp $GOPATH/bin/vault /usr/local/bin/vault
apk del go make git
# Clean directories
cd /root
rm -rf $GOPATH /usr/share/man /tmp/* /var/cache/apk/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment