Skip to content

Commit

Permalink
Re-iterate image to output everything to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Mar 4, 2024
1 parent 3a43e63 commit 45b6da8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ RUN apt-get update && apt-get install -y gettext-base curl
COPY deb/crowdstrike-cs-falconhoseclient_2.18.0_amd64.deb "${WORKDIR}/crowdstrike.deb"
RUN dpkg -i "${WORKDIR}/crowdstrike.deb"

# Create output file
RUN touch /var/log/crowdstrike/falconhoseclient/output

# Prepare a simple user instead of root
RUN groupadd -g 1000 user && useradd -r -u 1000 -g user user
RUN chown -R user:user /var/log/crowdstrike/falconhoseclient
Expand Down
2 changes: 1 addition & 1 deletion cfg/cs.falconhoseclient.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ output_format = json
# Will be true regardless if Syslog is not enabled
# If path does not exist or user has no permission, log file will be used
output_to_file = true
output_path = /var/log/crowdstrike/falconhoseclient/output
output_path = /dev/stdout

# Offset file full filepath and filename
offset_path = /var/log/crowdstrike/falconhoseclient/stream_offsets
Expand Down
5 changes: 1 addition & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,4 @@ fi
export $(echo "CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET API_BASE_URL=$API_BASE_URL") && envsubst < "${WORKDIR}/${CONFIG}.template" > "${CONFIGDIR}/${CONFIG}"

# Run this in the background and output the enrollment into a file
cs.falconhoseclient -config="${CONFIGDIR}/${CONFIG}" 2>&1

# Poll the output to stdout
tail -f ${LOGDIR}/output > /dev/stdout
cs.falconhoseclient -nodaemon -config="${CONFIGDIR}/${CONFIG}" 2>&1

0 comments on commit 45b6da8

Please sign in to comment.