Improve docker image by using .dockerignore
This commit is contained in:
parent
f73536740f
commit
a9bf64fd06
15
.dockerignore
Normal file
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",
|
||||
|
Loading…
Reference in New Issue
Block a user