mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 23:45:10 +00:00
- Node latest LTS - Go latest stable - Fabric 2.5.14, 3.1.3 - Just 1.43.0 - k9s 0.50.15 - Kind 0.30.0 - yq 4.48.1 - nvm 0.40.3 This addresses build breakages due to back-level versions. Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
36 lines
1 KiB
Docker
36 lines
1 KiB
Docker
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
FROM node:lts AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy node.js source and build, changing owner as well
|
|
COPY --chown=node:node . /usr/src/app
|
|
ENV npm_config_cache=/usr/src/app
|
|
RUN npm ci && npm run package
|
|
|
|
|
|
FROM node:lts AS production
|
|
ARG CC_SERVER_PORT
|
|
|
|
# Setup tini to work better handle signals
|
|
ENV TINI_VERSION v0.19.0
|
|
ENV PLATFORM=amd64
|
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
|
RUN chmod +x /tini
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY --chown=node:node --from=builder /usr/src/app/dist ./dist
|
|
COPY --chown=node:node --from=builder /usr/src/app/package.json ./
|
|
COPY --chown=node:node --from=builder /usr/src/app/npm-shrinkwrap.json ./
|
|
COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh
|
|
|
|
RUN npm ci --omit=dev && npm cache clean --force
|
|
|
|
ENV PORT $CC_SERVER_PORT
|
|
EXPOSE $CC_SERVER_PORT
|
|
ENV NODE_ENV=production
|
|
|
|
USER node
|
|
ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ]
|