From 4052cc2fdb4c3d9410ee2952a2b7b943ddd6b1ee Mon Sep 17 00:00:00 2001 From: Filippo Fontana Date: Wed, 29 Jan 2025 11:17:19 +0100 Subject: [PATCH] build: optimize images --- .dockerignore | 17 +++++++++++++++++ Dockerfile.cfg | 6 ++---- Dockerfile.evm | 6 ++---- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d3d847a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +.env +.envrc +.git +.gitignore +.yarn +.yarnrc +.yarnrc.yml +*.log +*.log.* +*.log.*.* +subquery-multichain.yaml +project-*.yaml +dist +node_modules +commitlint.config.js +.nvmrc +.prettierrc \ No newline at end of file diff --git a/Dockerfile.cfg b/Dockerfile.cfg index 4db1caa..2b23eda 100644 --- a/Dockerfile.cfg +++ b/Dockerfile.cfg @@ -5,10 +5,8 @@ RUN chown node:node /app USER node COPY --chown=node:node . . -RUN yarn install --frozen-lockfile -RUN CHAIN_ID="centrifuge" yarn projectgen -RUN yarn codegen -RUN yarn build +RUN yarn install --frozen-lockfile --no-cache +RUN CHAIN_ID="centrifuge" yarn projectgen && yarn codegen && yarn build FROM onfinality/subql-node:latest diff --git a/Dockerfile.evm b/Dockerfile.evm index c859628..9cf2a98 100644 --- a/Dockerfile.evm +++ b/Dockerfile.evm @@ -5,10 +5,8 @@ RUN chown node:node /app USER node COPY --chown=node:node . . -RUN yarn install --frozen-lockfile -RUN CHAIN_ID="centrifuge" yarn projectgen -RUN yarn codegen -RUN yarn build +RUN yarn install --frozen-lockfile --no-cache +RUN CHAIN_ID="centrifuge" yarn projectgen && yarn codegen && yarn build FROM onfinality/subql-node-ethereum:latest