This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change dockerfile to make compatible with collectors
- Loading branch information
Gonzalo Avalos Ribas
authored and
Gonzalo Avalos Ribas
committed
Apr 8, 2024
1 parent
e366dea
commit d18b939
Showing
1 changed file
with
4 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
FROM node:18-bullseye-slim as builder | ||
FROM node:18-alpine | ||
|
||
ENV JUPITERONE_INTEGRATION_DIR=/opt/jupiterone/integration | ||
|
||
COPY package.json yarn.lock tsconfig.dist.json tsconfig.json LICENSE ${JUPITERONE_INTEGRATION_DIR}/ | ||
COPY package.json yarn.lock tsconfig.json LICENSE ${JUPITERONE_INTEGRATION_DIR}/ | ||
COPY src/ ${JUPITERONE_INTEGRATION_DIR}/src | ||
WORKDIR ${JUPITERONE_INTEGRATION_DIR} | ||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/api/lists/* | ||
RUN yarn install | ||
RUN yarn build:docker | ||
|
||
|
||
FROM node:18-bullseye-slim | ||
ENV JUPITERONE_INTEGRATION_DIR=/opt/jupiterone/integration | ||
COPY --from=builder --chown=node:node ${JUPITERONE_INTEGRATION_DIR}/dist ${JUPITERONE_INTEGRATION_DIR} | ||
COPY --from=builder --chown=node:node ${JUPITERONE_INTEGRATION_DIR}/yarn.lock ${JUPITERONE_INTEGRATION_DIR} | ||
COPY scripts/ ${JUPITERONE_INTEGRATION_DIR}/scripts | ||
WORKDIR ${JUPITERONE_INTEGRATION_DIR} | ||
RUN apt-get update && apt-get install -y python3 | ||
RUN yarn install --production --fronzen-lockfile --cache-folder ./ycache && yarn global add --cache-folder ./ycache @jupiterone/integration-sdk-cli && rm -rf ./ycache && chown -R node:node /opt/jupiterone | ||
RUN export PATH="$(yarn global bin):$PATH" | ||
|
||
USER node | ||
RUN yarn install | ||
|
||
CMD ["sh", "scripts/execute.sh"] | ||
ENTRYPOINT /usr/local/bin/yarn j1-integration run -i ${INTEGRATION_INSTANCE_ID} --disable-schema-validation --api-base-url ${JUPITERONE_API_BASE_URL:-https://api.us.jupiterone.io} --account ${JUPITERONE_ACCOUNT} --api-key ${JUPITERONE_API_KEY} |