Improve docker image by using .dockerignore

This commit is contained in:
Tornado Contrib 2024-04-12 14:18:31 +00:00
parent f73536740f
commit a9bf64fd06
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
3 changed files with 17 additions and 5 deletions

15
.dockerignore Normal file

@ -0,0 +1,15 @@
node_modules
# Hardhat files
/cache
/artifacts
# TypeChain files
/typechain
/typechain-types
# solidity-coverage files
/coverage
/coverage.json
/flatten

@ -1,12 +1,8 @@
FROM node:20-alpine
WORKDIR /app
COPY ["package.json", "yarn.lock", "./"]
RUN yarn
COPY . .
RUN yarn build
RUN yarn && yarn build
ENTRYPOINT ["yarn", "start"]

@ -14,6 +14,7 @@
"files": [
"contracts",
"src",
".dockerignore",
".eslintrc.js",
".gitignore",
"docker-compose.yml",