1
ADD file ... in /
21.44 MB
2
CMD ["bash"]
0 B
3
ENV DEBIAN_FRONTEND=noninteractive
0 B
4
COPY file:6229791a987783682b536a308b0d287c470ec1bfa0be9b6b3471feab66706874 in /install.sh
925 B
5
/bin/sh -c /install.sh && rm
38.37 MB
6
ARG SPLUNK_FILENAME
0 B
7
ARG SPLUNK_BUILD_URL
0 B
8
ARG SPLUNK_DEFAULTS_URL
0 B
9
ENV SPLUNK_HOME=/opt/splunkforwarder SPLUNK_GROUP=splunk SPLUNK_USER=splunk
0 B
10
|1 SPLUNK_BUILD_URL=http://releases.splunk.com/dl/orangeswirl_builds/7.2.1-20181119-0400/splunkforwarder-7.2.1-be11b2c46e23-Linux-x86_64.tgz /bin/sh -c groupadd
23.32 MB
11
USER splunk
0 B
12
COPY dir:6e993b24f9f98057163ef8bd8c62e4861acd5bfa0b2053e0e38f2945df2a8e2a in /opt/ansible
20.04 KB
13
COPY multi:96216845d7aa8a7c7fe1625c00b24c9cf8c2077b7bfb6cd2170777135f01fa20 in /sbin/
2.92 KB
14
COPY multi:fb03ac2df458b42167388f14efe28124d79c80127da9acdba91b01e5ef99d67d in /tmp/
2.94 KB
15
EXPOSE 8088 8089 9997
0 B
16
VOLUME [/opt/splunkforwarder/etc /opt/splunkforwarder/var]
0 B
17
HEALTHCHECK &{["CMD-SHELL" "/sbin/checkstate.sh ||
0 B
18
ENTRYPOINT ["/sbin/entrypoint.sh"]
0 B
19
CMD ["start-service"]
0 B
Command
I have copied the dockerfile contentfrom dockerhub but it comes with line number and sizes, I want to create an awk control file to extract just the dockerfile content without the numbers or sizes. That is, I want to print 2nd,5th,8th,11th and so on lines. I can do it with bash scripting but I'm learning awk and want to do it that way.
Edit:
ADD file ... in /
CMD ["bash"]
ENV DEBIAN_FRONTEND=noninteractive
COPY file:6229791a987783682b536a308b0d287c470ec1bfa0be9b6b3471feab66706874 in /install.sh
/bin/sh -c /install.sh && rm
ARG SPLUNK_FILENAME
ARG SPLUNK_BUILD_URL
ARG SPLUNK_DEFAULTS_URL
ENV SPLUNK_HOME=/opt/splunkforwarder SPLUNK_GROUP=splunk SPLUNK_USER=splunk
|1 SPLUNK_BUILD_URL=http://releases.splunk.com/dl/orangeswirl_builds/7.2.1-20181119-0400/splunkforwarder-7.2.1-be11b2c46e23-Linux-x86_64.tgz /bin/sh -c groupadd
USER splunk
COPY dir:6e993b24f9f98057163ef8bd8c62e4861acd5bfa0b2053e0e38f2945df2a8e2a in /opt/ansible
COPY multi:96216845d7aa8a7c7fe1625c00b24c9cf8c2077b7bfb6cd2170777135f01fa20 in /sbin/
COPY multi:fb03ac2df458b42167388f14efe28124d79c80127da9acdba91b01e5ef99d67d in /tmp/
EXPOSE 8088 8089 9997
VOLUME [/opt/splunkforwarder/etc /opt/splunkforwarder/var]
HEALTHCHECK &{["CMD-SHELL" "/sbin/checkstate.sh ||
ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["start-service"]
Command
this should be the final output.
I'm at
awk 'BEGIN{NR==2 print $0}{NR==5,NR==8,... print $0}'
I'm not sure if we can sort in BEGIN block and how to use increment logic with NR varaible.