mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 23:45:10 +00:00
This patch moves publishing of REST sample image from AZP to GHA. This was the last job running on AZP. Also, this patch fixes an error encounterd during the image build. Publishing of REST sample image is now only executed when pushing to main. Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
25 lines
433 B
Docker
25 lines
433 B
Docker
FROM node:18-alpine3.14 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:18-alpine3.14
|
|
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"]
|