mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Node 20+ is now required. This is the oldest currently support LTS version of Node.js. Docker images are moved to Node 22, which is the current LTS release. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
25 lines
425 B
Docker
25 lines
425 B
Docker
FROM node:22-alpine AS build
|
|
|
|
RUN apk add --no-cache g++ make python3 dumb-init
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=node:node . /app
|
|
|
|
RUN npm ci
|
|
RUN npm run build
|
|
RUN npm prune --production
|
|
|
|
FROM node:22-alpine
|
|
ENV NODE_ENV production
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init
|
|
COPY --chown=node:node --from=build /app .
|
|
|
|
EXPOSE 3000
|
|
|
|
USER node
|
|
|
|
ENTRYPOINT [ "dumb-init", "--", "npm", "run"]
|
|
CMD ["start"]
|