Skip to content

Instantly share code, notes, and snippets.

@tstrohmeier
Last active November 21, 2020 14:45
Show Gist options
  • Save tstrohmeier/f9300b38a297ef645be88fb34c2e6ec8 to your computer and use it in GitHub Desktop.
Save tstrohmeier/f9300b38a297ef645be88fb34c2e6ec8 to your computer and use it in GitHub Desktop.
Install immutability-io's vault-ethereum in a vault docker container
version: '2'
services:
vault:
container_name: vault-eth-test
build:
context: ./
dockerfile: Dockerfile
image: vault:latest
cap_add:
- IPC_LOCK
ports:
- 8200:8200
- 8201:8201
# environment:
# - 'VAULT_LOCAL_CONFIG="plugin_directory" = "/vault/plugins"'
# - VAULT_DEV_ROOT_TOKEN_ID=test123456
FROM vault:latest
# Install build tools
RUN apk add --update alpine-sdk \
&& mkdir /vault/plugins \
&& apk update \
&& apk add go git \
&& go get github.com/immutability-io/vault-ethereum \
&& go build github.com/immutability-io/vault-ethereum \
&& mv /root/go/bin/vault-ethereum /vault/plugins/vault-ethereum \
&& export SHASUM256_eth=$(sha256sum "/vault/plugins/vault-ethereum" | cut -d' ' -f1) \
&& echo \"plugin_directory\" = \"/vault/plugins\" > /vault/config/plugin.json
export SHASUM256_eth=$(sha256sum "/vault/plugins/vault-ethereum" | cut -d' ' -f1)
vault auth -address=http://127.0.0.1:8200 <root_token>
vault write -address=http://127.0.0.1:8200 sys/plugins/catalog/ethereum-plugin \
sha_256="${SHASUM256_eth}" \
command="vault-ethereum"
vault secrets enable -address=http://127.0.0.1:8200 -path=ethereum -description="Immutability's Ethereum Wallet" -plugin-name=ethereum-plugin plugin
@steventranjs
Copy link

Hi @tstrohmeier,

Thanks a lot for your installation guide. However, it seem broken now when I build using the Dockerfile:

OK: 9544 distinct packages available
(1/1) Installing go (1.10.8-r0)
Executing busybox-1.28.4-r3.trigger
OK: 492 MiB in 56 packages
# github.com/immutability-io/vault-ethereum
root/go/src/github.com/immutability-io/vault-ethereum/path_blocks.go:92:37: block.Time().Uint64 undefined (type uint64 has no field or method Uint64)
The command '/bin/sh -c apk add --update alpine-sdk     && mkdir /vault/plugins     && apk update     && apk add go git     && go get github.com/immutability-io/vault-ethereum     && go build github.com/immutability-io/vault-ethereum     && mv /root/go/bin/vault-ethereum /vault/plugins/vault-ethereum     && export SHASUM256_eth=$(sha256sum "/vault/plugins/vault-ethereum" | cut -d' ' -f1)     && echo  \"plugin_directory\" = \"/vault/plugins\" > /vault/config/plugin.json' returned a non-zero code: 2

Looking forward to your help. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment