Skip to content

Commit c54a685

Browse files
committed
Move osquery related changes lower in the Dockerfiles
This should allow not having to rebuild all Hubble dependencies if there's a need for a change in osquery files.
1 parent 055a389 commit c54a685

File tree

8 files changed

+40
-40
lines changed

8 files changed

+40
-40
lines changed

pkg/amazonlinux2016.09/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ RUN yum makecache fast && yum -y update
1616
#paths that hubble or hubble parts need in the package
1717
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1818

19-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
20-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
21-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
22-
RUN /opt/osquery/osqueryi --version
23-
2419
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2520
RUN yum -y install git \
2621
libffi-devel openssl-devel libffi libssh2-devel autoconf automake libtool \
@@ -108,6 +103,11 @@ RUN umask 022 \
108103
RUN eval "$(pyenv init -)" \
109104
&& pip -v install --upgrade pip
110105

106+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
107+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
108+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
109+
RUN /opt/osquery/osqueryi --version
110+
111111
#pyinstaller start
112112
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
113113
#use the following variables to choose the version of hubble

pkg/centos6/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ RUN yum makecache fast && yum -y update
1616
#paths that hubble or hubble parts need in the package
1717
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1818

19-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
20-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
21-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
22-
RUN /opt/osquery/osqueryi --version
23-
2419
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2520
RUN yum -y install git \
2621
libffi-devel openssl-devel libxml2-devel libxslt-devel libffi \
@@ -109,6 +104,11 @@ RUN umask 022 \
109104
RUN eval "$(pyenv init -)" \
110105
&& pip -v install --upgrade pip
111106

107+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
108+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
109+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
110+
RUN /opt/osquery/osqueryi --version
111+
112112
#pyinstaller start
113113
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
114114
#use the following variables to choose the version of hubble

pkg/centos7/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ RUN yum makecache fast && yum -y update
1616
#paths that hubble or hubble parts need in the package
1717
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1818

19-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
20-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
21-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
22-
RUN /opt/osquery/osqueryi --version
23-
2419
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2520
RUN yum -y install git \
2621
libffi-devel openssl-devel libffi libssh2-devel autoconf automake libtool \
@@ -108,6 +103,11 @@ RUN umask 022 \
108103
RUN eval "$(pyenv init -)" \
109104
&& pip -v install --upgrade pip
110105

106+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
107+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
108+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
109+
RUN /opt/osquery/osqueryi --version
110+
111111
#pyinstaller start
112112
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
113113
#use the following variables to choose the version of hubble

pkg/centos8/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ RUN dnf -y update
1616
#paths that hubble or hubble parts need in the package
1717
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1818

19-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
20-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
21-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
22-
RUN /opt/osquery/osqueryi --version
23-
2419
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2520
RUN dnf -y install git \
2621
libffi-devel openssl-devel libffi libssh-devel autoconf automake libtool \
@@ -114,6 +109,11 @@ RUN umask 022 \
114109
RUN eval "$(pyenv init -)" \
115110
&& pip -v install --upgrade pip
116111

112+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
113+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
114+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
115+
RUN /opt/osquery/osqueryi --version
116+
117117
#pyinstaller start
118118
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
119119
#use the following variables to choose the version of hubble

pkg/coreos/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ RUN apt-get update \
1717
#paths that hubble or hubble parts need in the package
1818
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1919

20-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
21-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
22-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
23-
RUN /opt/osquery/osqueryi --version
24-
2520
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2621
RUN apt-get -y install git curl \
2722
python-dev libffi-dev libssl-dev libyaml-dev libssh2-1 libssh2-1-dev autoconf automake libtool \
@@ -106,6 +101,11 @@ RUN umask 022 \
106101
RUN eval "$(pyenv init -)" \
107102
&& pip -v install --upgrade pip
108103

104+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
105+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
106+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
107+
RUN /opt/osquery/osqueryi --version
108+
109109
#pyinstaller start
110110
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
111111
#use the following variables to choose the version of hubble

pkg/debian10/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ RUN apt-get update \
1717
#paths that hubble or hubble parts need in the package
1818
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1919

20-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
21-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
22-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
23-
RUN /opt/osquery/osqueryi --version
24-
2520
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2621
RUN apt-get -y install git curl \
2722
python-dev libffi-dev libssl-dev libyaml-dev libssh2-1 libssh2-1-dev autoconf automake libtool \
@@ -111,6 +106,11 @@ RUN umask 022 \
111106
RUN eval "$(pyenv init -)" \
112107
&& pip -v install --upgrade pip
113108

109+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
110+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
111+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
112+
RUN /opt/osquery/osqueryi --version
113+
114114
#pyinstaller start
115115
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
116116
#use the following variables to choose the version of hubble

pkg/debian8/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ RUN apt-get update \
1717
#paths that hubble or hubble parts need in the package
1818
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1919

20-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
21-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
22-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
23-
RUN /opt/osquery/osqueryi --version
24-
2520
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2621
RUN apt-get -y install git curl \
2722
python-dev libffi-dev libssl-dev libyaml-dev libssh2-1 libssh2-1-dev autoconf automake libtool \
@@ -110,6 +105,11 @@ RUN umask 022 \
110105
RUN eval "$(pyenv init -)" \
111106
&& pip -v install --upgrade pip
112107

108+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
109+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
110+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
111+
RUN /opt/osquery/osqueryi --version
112+
113113
#pyinstaller start
114114
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
115115
#use the following variables to choose the version of hubble

pkg/debian9/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ RUN apt-get update \
1717
#paths that hubble or hubble parts need in the package
1818
RUN mkdir -p /etc/hubble/hubble.d /opt/hubble /opt/osquery /var/log/hubble_osquery/backuplogs
1919

20-
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
21-
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
22-
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
23-
RUN /opt/osquery/osqueryi --version
24-
2520
#install packages that should be needed for ligbit2 compilation and successful pyinstaller run
2621
RUN apt-get -y install git curl \
2722
python-dev libffi-dev libssl-dev libyaml-dev libssh2-1 libssh2-1-dev autoconf automake libtool \
@@ -111,6 +106,11 @@ RUN umask 022 \
111106
RUN eval "$(pyenv init -)" \
112107
&& pip -v install --upgrade pip
113108

109+
#extract osquery files. optionally pass in osquery filename with OSQUERY_TAR_FILENAME build-arg
110+
ARG OSQUERY_TAR_FILENAME=osquery_4hubble.tar
111+
ADD ${OSQUERY_TAR_FILENAME} /opt/osquery/
112+
RUN /opt/osquery/osqueryi --version
113+
114114
#pyinstaller start
115115
#commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built
116116
#use the following variables to choose the version of hubble

0 commit comments

Comments
 (0)