-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (24 loc) · 798 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM italomaia/truffle:4.0.1
EXPOSE 8545
EXPOSE 30303
ENV CHDIR $HOME/ChainSkills
ENV DTDIR $CHDIR/private
COPY --chown=1000:1000 password.sec $HOME
COPY --chown=1000:1000 genesis.json $HOME
RUN mkdir -p ${DTDIR}
# initialize genesis
RUN geth --datadir ${DTDIR} init genesis.json
# create user accounts
RUN geth --datadir ${DTDIR} account new --password "$HOME/password.sec"
RUN geth --datadir ${DTDIR} account new --password "$HOME/password.sec"
RUN geth --datadir ${DTDIR} account new --password "$HOME/password.sec"
VOLUME ${CHDIR}
CMD geth \
--datadir ${DTDIR} \
--networkid 4224 \
--mine --nodiscover \
--rpc --rpcport "8545" --rpccorsdomain "*" \
--port "30303" --nat "any" \
--rpcapi eth,web3,personal,net \
--unlock 0 \
--password "$HOME/password.sec"