Skip to content

Commit

Permalink
reduce docker siz (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Aug 15, 2023
1 parent bc56752 commit fa58272
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
21 changes: 18 additions & 3 deletions Dockerfile
@@ -1,9 +1,24 @@
FROM node:16

FROM ubuntu:20.04 as base
RUN apt-get update && apt-get -y install bash curl
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
RUN bash /tmp/nodesource_setup.sh
RUN apt install nodejs



FROM base as builder
RUN apt-get update && apt-get -y install wget
COPY package*.json /usr/src/app/
WORKDIR /usr/src/app
RUN npm install
WORKDIR /usr/src/app/
ENV NODE_ENV=production
RUN npm ci


FROM base as runner
ENV NODE_ENV=production
COPY . /usr/src/app
WORKDIR /usr/src/app/
COPY --from=builder /usr/src/app/node_modules/ /usr/src/app/node_modules/
ENV DEPLOY_SUBGRAPH=true
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -46,8 +46,6 @@
"changelog": "auto-changelog -p"
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.38.0",
"@graphprotocol/graph-ts": "^0.30.0",
"@types/chai": "^4.3.5",
"@types/chai-spies": "^1.0.3",
"@types/mocha": "^10.0.1",
Expand All @@ -71,14 +69,16 @@
"ts-node": "^10.9.1",
"ts-node-dev": "^2.0.0",
"ts-node-register": "^1.0.0",
"typescript": "^5.0.4"
},
"dependencies": {
"@oceanprotocol/contracts": "^1.1.14",
"typescript": "^5.0.4",
"@oceanprotocol/lib": "^2.7.0",
"cross-fetch": "^3.1.6",
"ethereumjs-util": "^7.1.5"
},
"dependencies": {
"@oceanprotocol/contracts": "^1.1.14",
"@graphprotocol/graph-cli": "^0.38.0",
"@graphprotocol/graph-ts": "^0.30.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/oceanprotocol/ocean-subgraph.git"
Expand Down

0 comments on commit fa58272

Please sign in to comment.