-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.in
51 lines (39 loc) · 1008 Bytes
/
Dockerfile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# Build stage
#
# This will build our hacked version of ping, which will then be copied by the main container.
#
FROM debian:stretch as builder
RUN apt-get update && apt-get install -y git gcc make libcap-dev libidn2-0-dev nettle-dev
#
# Compile my hacked version of ping from https://github.com/dmuth/iputils
# This will give us periodic updates on packets sent/received and include the
# name of the target in the output.
#
WORKDIR /
RUN git clone https://github.com/dmuth/iputils.git
WORKDIR /iputils
RUN make
#
# Base this on the Splunk Lab container
#
FROM dmuth1/splunk-lab:%SPLUNK_VERSION%
#
# Copy our hacked ping.
#
COPY --from=builder /iputils/ping /iputils/ping
#
# Copy our entrypoint script in, the main thing it will
# do is add to inputs.conf for each target.
#
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
#
# Copy in our application
#
COPY splunk-app/ /opt/splunk/etc/apps/Network-Monitor
#
# Expose Splunk web
#
EXPOSE 8000/tcp
ENTRYPOINT ["/entrypoint.sh"]