fabric-samples/asset-transfer-basic/rest-api-typescript/Dockerfile
Tatsuya Sato bda72cac00 Move publishing of REST sample Image from AZP to GHA
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>
2023-09-28 12:38:43 -04:00

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"]