Skip to content

Commit

Permalink
Merge pull request #344 from lucasvuotto/fix/docker-build
Browse files Browse the repository at this point in the history
Rework Dockerfile
  • Loading branch information
augustoIOV authored Jun 6, 2022
2 parents 5028c4d + e526ce3 commit 8e71851
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM node:16.6.1-alpine3.13
FROM node:16-alpine

RUN apk add --no-cache python2 build-base


COPY --chown=node:node ./federator /app/federator
COPY --chown=node:node ./bridge/abi /app/bridge/abi

WORKDIR /app/federator

RUN chown -R node:node .
RUN apk add --no-cache build-base git python3

WORKDIR /home/node
USER node

COPY --chown=node:node ./federator/package*.json ./federator/
WORKDIR ./federator
RUN npm ci

ENTRYPOINT [ "npm", "start" ]
WORKDIR ../
COPY --chown=node:node ./bridge/abi ./bridge/abi/
COPY --chown=node:node ./federator/ ./federator/

WORKDIR ./federator
RUN (cd ./config/ && cp config.sample.js config.js) && \
npx tsc --build

WORKDIR ./built/federator
CMD ["node", "./src/main.js"]

0 comments on commit 8e71851

Please sign in to comment.