From 022a816b7ddb00c1c4bb98a10525438152492292 Mon Sep 17 00:00:00 2001 From: hmiao <739025250@qq.com> Date: Fri, 11 Nov 2022 16:29:01 +0800 Subject: [PATCH] change Dockerfile to make build success --- .dokcerignore | 1 + Dockerfile | 6 ++---- truffle-config.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.dokcerignore b/.dokcerignore index eb79dd5..d31e1cc 100644 --- a/.dokcerignore +++ b/.dokcerignore @@ -1,2 +1,3 @@ node_modules +build .idea diff --git a/Dockerfile b/Dockerfile index 52f32e3..38fc088 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,9 @@ FROM node:16 WORKDIR /app -COPY contracts/ /app/contracts -COPY migrations/ /app/migrations -COPY truffle-config.js /app/truffle-config.js +COPY . . -RUN npm install -g truffle@5.5.14 && truffle compile +RUN npm install -g truffle@5.5.14 && npm i && truffle compile ENTRYPOINT [ "truffle" ] CMD [ "migrate" ] \ No newline at end of file diff --git a/truffle-config.js b/truffle-config.js index d6a2fc2..c65a7e4 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,8 +1,8 @@ require("dotenv").config() const HDWalletProvider = require("@truffle/hdwallet-provider"); -const DELTA_PKEY = process.env.DELTA_PKEY; -const DELTA_ADDR = process.env.DELTA_ADDR; +const DELTA_PKEY = process.env.DELTA_PKEY || ""; +const DELTA_ADDR = process.env.DELTA_ADDR || ""; module.exports = { networks: {