Dockerfile (808B)
1 FROM ethereum/solc:0.6.12 2 3 FROM python:3.8.6-alpine 4 5 COPY --from=0 /usr/bin/solc /usr/bin/solc 6 7 RUN apk update &&\ 8 apk add gcc bash musl-dev 9 10 WORKDIR /usr/src 11 12 # Try to keep everything above here re-usable! 13 14 COPY ./solidity/ /usr/src/eth_accounts_index/solidity/ 15 COPY ./python/ /usr/src/eth_accounts_index/python/ 16 17 RUN cd eth_accounts_index/solidity && \ 18 solc AccountsIndex.sol --abi | awk 'NR>3' > AccountsIndex.abi.json 19 20 RUN cd eth_accounts_index/solidity && \ 21 solc AccountsIndex.sol --bin | awk 'NR>3' > AccountsIndex.bin && \ 22 truncate -s "$((`stat -t -c "%s" AccountsIndex.bin`-1))" AccountsIndex.bin 23 24 RUN cd eth_accounts_index/python && \ 25 pip install --extra-index-url https://pip.grassrootseconomics.net:8433 . 26 27 # To deploy: 28 # eth-accounts-index --contracts-dir eth_accounts_index/solidity/ [...]