mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-24 18:45:09 +00:00
Build an arch-specific CC images on M1
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
This commit is contained in:
parent
13a692eb38
commit
9fa6177076
2 changed files with 11 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ ARG CC_SERVER_PORT
|
||||||
|
|
||||||
# Setup tini to work better handle signals
|
# Setup tini to work better handle signals
|
||||||
ENV TINI_VERSION v0.19.0
|
ENV TINI_VERSION v0.19.0
|
||||||
ENV PLATFORM=amd64
|
ENV PLATFORM=arm64
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ RUN npm ci --omit=dev && npm cache clean --force
|
||||||
FROM node:16.14 AS ccaas
|
FROM node:16.14 AS ccaas
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
ARG TARGETOS
|
||||||
|
|
||||||
COPY --chown=node:node --from=prod-builder /usr/src/app .
|
COPY --chown=node:node --from=prod-builder /usr/src/app .
|
||||||
COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh
|
COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh
|
||||||
|
|
||||||
|
|
@ -32,7 +35,7 @@ ENV PORT $CC_SERVER_PORT
|
||||||
EXPOSE $CC_SERVER_PORT
|
EXPOSE $CC_SERVER_PORT
|
||||||
|
|
||||||
ENV TINI_VERSION=v0.19.0
|
ENV TINI_VERSION=v0.19.0
|
||||||
ENV PLATFORM=amd64
|
ENV PLATFORM=${TARGETARCH}
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
|
|
||||||
|
|
@ -47,11 +50,16 @@ ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ]
|
||||||
FROM node:16.14 AS k8s
|
FROM node:16.14 AS k8s
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
ARG TARGETOS
|
||||||
|
|
||||||
COPY --chown=node:node --from=prod-builder /usr/src/app .
|
COPY --chown=node:node --from=prod-builder /usr/src/app .
|
||||||
COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh
|
COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN printenv
|
||||||
|
|
||||||
ENV TINI_VERSION=v0.19.0
|
ENV TINI_VERSION=v0.19.0
|
||||||
ENV PLATFORM=amd64
|
ENV PLATFORM=${TARGETARCH}
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${PLATFORM} /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue