@@ -6,23 +6,75 @@ FROM node:18-alpine
66RUN apk update && apk add --no-cache bash git jq curl python3 gcc make g++ \
77 && rm -rf /var/cache/apk/*
88
9+ RUN npm i -g ts-node
10+
911# Default local client path: clients/ethereumjs/<ethereumjs-monorepo>
1012ARG local_path=ethereumjs-monorepo
11- COPY $local_path ethereumjs-monorepo
13+
14+ COPY ${local_path}/config ethereumjs-monorepo/config
15+ COPY ${local_path}/package-lock.json ethereumjs-monorepo/package-lock.json
16+ COPY ${local_path}/package.json ethereumjs-monorepo/package.json
17+ COPY ${local_path}/scripts ethereumjs-monorepo/scripts
18+
19+ COPY ${local_path}/packages/block/package.json ethereumjs-monorepo/packages/block/package.json
20+ COPY ${local_path}/packages/blockchain/package.json ethereumjs-monorepo/packages/blockchain/package.json
21+ COPY ${local_path}/packages/client/package.json ethereumjs-monorepo/packages/client/package.json
22+ COPY ${local_path}/packages/common/package.json ethereumjs-monorepo/packages/common/package.json
23+ COPY ${local_path}/packages/devp2p/package.json ethereumjs-monorepo/packages/devp2p/package.json
24+ COPY ${local_path}/packages/ethash/package.json ethereumjs-monorepo/packages/ethash/package.json
25+ COPY ${local_path}/packages/evm/package.json ethereumjs-monorepo/packages/evm/package.json
26+ COPY ${local_path}/packages/genesis/package.json ethereumjs-monorepo/packages/genesis/package.json
27+ COPY ${local_path}/packages/rlp/package.json ethereumjs-monorepo/packages/rlp/package.json
28+ COPY ${local_path}/packages/statemanager/package.json ethereumjs-monorepo/packages/statemanager/package.json
29+ COPY ${local_path}/packages/trie/package.json ethereumjs-monorepo/packages/trie/package.json
30+ COPY ${local_path}/packages/tx/package.json ethereumjs-monorepo/packages/tx/package.json
31+ COPY ${local_path}/packages/util/package.json ethereumjs-monorepo/packages/util/package.json
32+ COPY ${local_path}/packages/verkle/package.json ethereumjs-monorepo/packages/verkle/package.json
33+ COPY ${local_path}/packages/vm/package.json ethereumjs-monorepo/packages/vm/package.json
34+ COPY ${local_path}/packages/wallet/package.json ethereumjs-monorepo/packages/wallet/package.json
35+
36+ # for npm run prepare
37+ RUN cd ethereumjs-monorepo && git init
38+
39+ RUN cd ethereumjs-monorepo && cp package.json package.json.bak && npm pkg set scripts.postinstall="echo no-postinstall"
1240RUN cd ethereumjs-monorepo && npm i
41+ RUN cd ethereumjs-monorepo && cp package.json.bak package.json && rm package.json.bak
42+
43+ COPY ${local_path}/node_modules/@ethereumjs ethereumjs-monorepo/node_modules/@ethereumjs
44+
45+ COPY ${local_path}/packages/rlp ethereumjs-monorepo/packages/rlp
46+ COPY ${local_path}/packages/util ethereumjs-monorepo/packages/util
47+ COPY ${local_path}/packages/verkle ethereumjs-monorepo/packages/verkle
48+ COPY ${local_path}/packages/wallet ethereumjs-monorepo/packages/wallet
49+ COPY ${local_path}/packages/common ethereumjs-monorepo/packages/common
50+ COPY ${local_path}/packages/devp2p ethereumjs-monorepo/packages/devp2p
51+ COPY ${local_path}/packages/genesis ethereumjs-monorepo/packages/genesis
52+ COPY ${local_path}/packages/trie ethereumjs-monorepo/packages/trie
53+ COPY ${local_path}/packages/statemanager ethereumjs-monorepo/packages/statemanager
54+ COPY ${local_path}/packages/tx ethereumjs-monorepo/packages/tx
55+ COPY ${local_path}/packages/evm ethereumjs-monorepo/packages/evm
56+ COPY ${local_path}/packages/block ethereumjs-monorepo/packages/block
57+ COPY ${local_path}/packages/ethash ethereumjs-monorepo/packages/ethash
58+ COPY ${local_path}/packages/blockchain ethereumjs-monorepo/packages/blockchain
59+ COPY ${local_path}/packages/vm ethereumjs-monorepo/packages/vm
60+
61+ RUN cd ethereumjs-monorepo/packages/client && cp package.json package.json.bak && npm pkg set scripts.build="echo no-build"
62+ RUN cd ethereumjs-monorepo && npm run build --workspaces
63+
64+ COPY ${local_path}/packages/client ethereumjs-monorepo/packages/client
1365
1466# Create version.txt
1567RUN cd ethereumjs-monorepo/packages/client && npm ethereumjs --version > /version.txt
1668
1769# Add genesis mapper script, startup script, and enode URL retriever script
1870ADD genesis.json /genesis.json
1971ADD mapper.jq /mapper.jq
20- ADD ethereumjs.sh /ethereumjs.sh
72+ ADD ethereumjs-local .sh /ethereumjs-local .sh
2173ADD enode.sh /hive-bin/enode.sh
2274ADD jwtsecret /jwtsecret
2375
2476# Set execute permissions for scripts
25- RUN chmod +x /ethereumjs.sh /hive-bin/enode.sh
77+ RUN chmod +x /ethereumjs-local .sh /hive-bin/enode.sh
2678
2779# Expose networking ports
2880EXPOSE 8545 8546 8551 8547 30303 30303/udp
@@ -32,4 +84,4 @@ EXPOSE 8545 8546 8551 8547 30303 30303/udp
3284# since memory may spike during certain network conditions.
3385ENV NODE_OPTIONS=--max_old_space_size=6144
3486
35- ENTRYPOINT ["/ethereumjs.sh"]
87+ ENTRYPOINT ["/ethereumjs-local .sh"]
0 commit comments