Last active
November 21, 2020 14:45
-
-
Save tstrohmeier/f9300b38a297ef645be88fb34c2e6ec8 to your computer and use it in GitHub Desktop.
Install immutability-io's vault-ethereum in a vault docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
src of the plugin: https://github.com/immutability-io/vault-ethereum