Skip to content

Commit

Permalink
Add binary + entrypoint to /usr/local/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Feb 8, 2024
1 parent 161c286 commit 738b46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ WORKDIR "${WORKDIR}"
COPY deb/crowdstrike-cs-falconhoseclient_2.18.0_amd64.deb "${WORKDIR}/crowdstrike.deb"
RUN dpkg -i "${WORKDIR}/crowdstrike.deb"

# Copy the binary executable to /usr/local/bin
RUN ln -s /opt/crowdstrike/bin/cs.falconhoseclient /usr/local/bin/cs.falconhoseclient
RUN ln -s "${WORKDIR}/entrypoint.sh" /usr/local/bin/falconhoseclient

# Change user access to the configuration files (could be better)
RUN chown -R user:user /opt/crowdstrike/etc/

Expand All @@ -52,6 +56,4 @@ RUN chown -R user:user "${WORKDIR}"
# Change to user
USER user

ENV PATH="${WORKDIR}:${PATH}"

ENTRYPOINT [ "/bin/bash", "-c", "exec ${WORKDIR}/entrypoint.sh" ]
ENTRYPOINT [ "falconhoseclient" ]
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ echo "API Base URL: $API_BASE_URL"
# Substitute things properly
export $(echo "CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET API_BASE_URL=$API_BASE_URL") && envsubst < "${WORKDIR}/${CONFIG}.template" > "${WORKDIR}/${CONFIG}"

/opt/crowdstrike/bin/cs.falconhoseclient -nodaemon -config="${WORKDIR}/${CONFIG}" 2>&1
cs.falconhoseclient -nodaemon -config="${WORKDIR}/${CONFIG}" 2>&1

0 comments on commit 738b46e

Please sign in to comment.