forked from lacchain/pq-permissioning-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (33 loc) · 803 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
31
32
33
34
35
36
37
38
FROM node:lts-slim
WORKDIR /app/
RUN npm install truffle @truffle/hdwallet-provider
COPY contracts/ contracts/
COPY build/ build/
COPY migrations/ migrations/
RUN echo '#!/bin/sh\n\
set -x\n\
cat > /app/truffle-config.js <<_EOF_\n\
const HDWalletProvider = require("@truffle/hdwallet-provider");\n\
module.exports = {\n\
networks: {\n\
development: {\n\
host: "${NODE_REMOTE_HOST}",\n\
port: ${NODE_REMOTE_PORT},\n\
network_id: "*",\n\
gasPrice: 0,\n\
provider: () => new HDWalletProvider("${ETHEREUM_SK}", "http://${NODE_REMOTE_HOST}:${NODE_REMOTE_PORT}")\n\
}\n\
},\n\
compilers: {\n\
solc: {\n\
version: "0.6.5"\n\
}\n\
}\n\
};\n\
_EOF_\n\
\n\
cd /app/\n\
npx truffle migrate\n'\
>> /run.sh
RUN chmod +x /run.sh
ENTRYPOINT ["/run.sh"]