Use npm registry instead of tgz file (#2754)

Signed-off-by: Rupal Mahajan <maharup@amazon.com>
This commit is contained in:
Rupal Mahajan 2023-03-21 09:58:54 -07:00 committed by GitHub
parent 713eac8e67
commit a89eeb0a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -52,10 +52,7 @@ RUN apt-get update && \
# Copy function code
WORKDIR ${FUNCTION_DIR}
RUN curl -LJO https://artifacts.opensearch.org/reporting-cli/opensearch-reporting-cli-1.0.0.tgz
RUN tar -xzf opensearch-reporting-cli-1.0.0.tgz
RUN mv package/* .
RUN npm install && npm install aws-lambda-ric
RUN npm install @opensearch-project/reporting-cli && npm install aws-lambda-ric
# Build Stage 2: Copy Build Stage 1 files in to Stage 2. Install chrome, then remove chrome to keep the dependencies.
FROM node:lts-slim
@ -81,7 +78,7 @@ RUN apt-get update \
ENTRYPOINT ["/usr/local/bin/npx", "aws-lambda-ric"]
ENV HOME="/tmp"
CMD [ "/function/src/index.handler" ]
CMD [ "/function/node_modules/@opensearch-project/reporting-cli/src/index.handler" ]
```