Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jiqiang90 committed Apr 8, 2024
1 parent 5e38958 commit 3a46f5f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions packages/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ FROM node:18-alpine
COPY --from=builder /app/packages/node/app.tgz /app.tgz

# Install production dependencies
RUN apk add --no-cache tini curl git && \
apk add --no-cache python3 make g++ && \
npm install -g node-gyp

# Install the app
RUN npm i -g app.tgz

# Clean up unused deps
RUN rm /app.tgz && \
RUN apk add --no-cache tini curl git && \
tar -xzvf /app.tgz --strip 1 && \
rm /app.tgz && \
yarn install --production && \
yarn cache clean && \
rm -rf /root/.npm /root/.cache

# Make the user not ROOT
USER 1000

# Set Entry point and command
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/lib/node_modules/@subql/node-algorand/bin/run"]
ENTRYPOINT ["/sbin/tini", "--", "/bin/run"]
CMD ["-f","/app"]

0 comments on commit 3a46f5f

Please sign in to comment.