@@ -6,23 +6,75 @@ FROM node:18-alpine
6
6
RUN apk update && apk add --no-cache bash git jq curl python3 gcc make g++ \
7
7
&& rm -rf /var/cache/apk/*
8
8
9
+ RUN npm i -g ts-node
10
+
9
11
# Default local client path: clients/ethereumjs/<ethereumjs-monorepo>
10
12
ARG 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"
12
40
RUN 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
13
65
14
66
# Create version.txt
15
67
RUN cd ethereumjs-monorepo/packages/client && npm ethereumjs --version > /version.txt
16
68
17
69
# Add genesis mapper script, startup script, and enode URL retriever script
18
70
ADD genesis.json /genesis.json
19
71
ADD mapper.jq /mapper.jq
20
- ADD ethereumjs.sh /ethereumjs.sh
72
+ ADD ethereumjs-local .sh /ethereumjs-local .sh
21
73
ADD enode.sh /hive-bin/enode.sh
22
74
ADD jwtsecret /jwtsecret
23
75
24
76
# 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
26
78
27
79
# Expose networking ports
28
80
EXPOSE 8545 8546 8551 8547 30303 30303/udp
@@ -32,4 +84,4 @@ EXPOSE 8545 8546 8551 8547 30303 30303/udp
32
84
# since memory may spike during certain network conditions.
33
85
ENV NODE_OPTIONS=--max_old_space_size=6144
34
86
35
- ENTRYPOINT ["/ethereumjs.sh"]
87
+ ENTRYPOINT ["/ethereumjs-local .sh"]
0 commit comments