File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM dockerflow/docker-flow-proxy
22
3+ ENV PACKETBEAT_CONFIG /packetbeat/packetbeat.yml
4+
35RUN apk add --update \
46 openssl \
57 bash \
@@ -12,11 +14,10 @@ RUN apk add glibc-2.25-r0.apk
1214ENV LANG=C.UTF-8
1315
1416
15- RUN wget https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-5.4.0-linux-x86_64.tar.gz
16- RUN tar xzf packetbeat-5.4.0-linux-x86_64.tar.gz
17- RUN rm packetbeat-5.4.0-linux-x86_64.tar.gz
18- RUN mv packetbeat-5.4.0-linux-x86_64 /packetbeat
19- COPY packetbeat.yml /packetbeat/packetbeat.yml
17+ RUN wget https://artifacts.elastic.co/downloads/beats/packetbeat/packetbeat-7.16.1-linux-x86_64.tar.gz
18+ RUN tar xzf packetbeat-7.16.1-linux-x86_64.tar.gz
19+ RUN rm packetbeat-7.16.1-linux-x86_64.tar.gz
20+ RUN mv packetbeat-7.16.1-linux-x86_64 /packetbeat
2021COPY scripts/runner_pbeat.sh /runner_pbeat.sh
2122RUN chmod +x /runner_pbeat.sh
2223
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33# Start the first process
44echo ' Packetbeat starting' ;
5- nohup ./packetbeat/packetbeat -c /packetbeat/packetbeat.yml &
5+ nohup ./packetbeat/packetbeat -c ${PACKETBEAT_CONFIG} &
66status=$?
77if [ $status -ne 0 ]; then
88 echo " Failed to start packetbeat: $status "
@@ -17,6 +17,9 @@ if [ $status -ne 0 ]; then
1717 exit $status
1818fi
1919
20+ # Give the process a chance to start.
21+ sleep 3
22+
2023# Naive check runs checks once a minute to see if either of the processes exited.
2124# This illustrates part of the heavy lifting you need to do if you want to run
2225# more than one service in a container. The container will exit with an error
@@ -29,9 +32,13 @@ while /bin/true; do
2932 PROCESS_2_STATUS=$?
3033 # If the greps above find anything, they will exit with 0 status
3134 # If they are not both 0, then something is wrong
32- if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then
33- echo " One of the processes has already exited."
34- exit -1
35+ if [ $PROCESS_1_STATUS -ne 0 ]; then
36+ echo " Packetbeat has already exited."
37+ exit 1
38+ fi
39+ if [ $PROCESS_2_STATUS -ne 0 ]; then
40+ echo " Docker-flow-proxy has already exited."
41+ exit 1
3542 fi
3643 sleep 60
3744done
You can’t perform that action at this time.
0 commit comments