diff --git a/asset-transfer-basic/chaincode-typescript/Dockerfile b/asset-transfer-basic/chaincode-typescript/Dockerfile index 74623698..b2ee6a20 100644 --- a/asset-transfer-basic/chaincode-typescript/Dockerfile +++ b/asset-transfer-basic/chaincode-typescript/Dockerfile @@ -16,7 +16,7 @@ ARG CC_SERVER_PORT # Setup tini to work better handle signals 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 RUN chmod +x /tini diff --git a/full-stack-asset-transfer-guide/contracts/asset-transfer-typescript/Dockerfile b/full-stack-asset-transfer-guide/contracts/asset-transfer-typescript/Dockerfile index 92b7fe8b..a4213d34 100644 --- a/full-stack-asset-transfer-guide/contracts/asset-transfer-typescript/Dockerfile +++ b/full-stack-asset-transfer-guide/contracts/asset-transfer-typescript/Dockerfile @@ -24,6 +24,9 @@ RUN npm ci --omit=dev && npm cache clean --force FROM node:16.14 AS ccaas WORKDIR /usr/src/app +ARG TARGETARCH +ARG TARGETOS + COPY --chown=node:node --from=prod-builder /usr/src/app . 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 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 RUN chmod +x /tini @@ -47,11 +50,16 @@ ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ] FROM node:16.14 AS k8s WORKDIR /usr/src/app +ARG TARGETARCH +ARG TARGETOS + COPY --chown=node:node --from=prod-builder /usr/src/app . COPY --chown=node:node docker/docker-entrypoint.sh /usr/src/app/docker-entrypoint.sh +RUN printenv + 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 RUN chmod +x /tini