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
|
FROM node:20-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ["package.json", "yarn.lock", "./"]
|
|
||||||
|
|
||||||
RUN yarn
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn build
|
RUN yarn && yarn build
|
||||||
|
|
||||||
ENTRYPOINT ["yarn", "start"]
|
ENTRYPOINT ["yarn", "start"]
|
@ -14,6 +14,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"contracts",
|
"contracts",
|
||||||
"src",
|
"src",
|
||||||
|
".dockerignore",
|
||||||
".eslintrc.js",
|
".eslintrc.js",
|
||||||
".gitignore",
|
".gitignore",
|
||||||
"docker-compose.yml",
|
"docker-compose.yml",
|
||||||
|
Loading…
Reference in New Issue
Block a user