Explorar o código

Merge branch '1' of ssh://gitlab.com/interlink-sa/flowdat3/vendors/kea into 1

gabriel %!s(int64=6) %!d(string=hai) anos
pai
achega
477b9e7395
Modificáronse 3 ficheiros con 67 adicións e 53 borrados
  1. 39 31
      1.4.0/kea-ik/Dockerfile
  2. 20 19
      1.4.0/kea-oss/Dockerfile
  3. 8 3
      1.4.0/kea-premium/Dockerfile

+ 39 - 31
1.4.0/kea-ik/Dockerfile

@@ -1,39 +1,47 @@
 FROM docker.infra.flowdat.com/fd3/kea-oss-1.4.0:latest
 
-# C++ LIBRARIES
-
-RUN git clone git://github.com/alanxz/rabbitmq-c.git
-RUN apt-get update && apt-get install -yq cmake
-RUN cd rabbitmq-c && mkdir build && cd build && cmake .. && cmake --build .
-RUN cd rabbitmq-c/build && make  && make install
-
-RUN git clone https://github.com/akalend/amqpcpp
-RUN cd amqpcpp && make && make install
-
-RUN cp -P /usr/local/lib/x86_64-linux-gnu/librabbitmq.* /usr/local/lib/
-RUN cp amqpcpp/libamqpcpp.a /usr/local/lib/libamqpcpp.a
-RUN cp amqpcpp/libamqpcpp.so /usr/local/lib/libamqpcpp.so
-
-RUN wget -O libzdb-3.1.tar.gz http://www.tildeslash.com/libzdb/dist/libzdb-3.1.tar.gz
-RUN tar xvzf libzdb-3.1.tar.gz
-RUN cd libzdb-3.1 && ./configure --without-postgresql --without-sqlite && make && make install
-
-RUN git clone https://github.com/alanxz/SimpleAmqpClient
-RUN cd SimpleAmqpClient && mkdir simpleamqpclient-build && cd simpleamqpclient-build && cmake .. && make && make install
-
-RUN ldconfig
-
-# FLOWDAT KEA HOOK
-
-RUN mkdir ~/.ssh
-RUN ssh-keyscan -H -p 22  bitbucket.org >> ~/.ssh/known_hosts
 COPY keys/ /opt/keys
-RUN chmod 0600 /opt/keys/bitbucket.id_rsa
-
 COPY inotify.sh /usr/local/etc/kea/inotify.sh
-
 COPY script.sh /opt/script.sh
-RUN chmod +x /opt/script.sh
+
+# C++ LIBRARIES
+RUN git clone git://github.com/alanxz/rabbitmq-c.git; \
+    cd rabbitmq-c; \
+    mkdir build; \
+    cd build; \
+    cmake ..; \
+    cmake --build .; \
+    cd rabbitmq-c/build; \
+    make; \
+    make install; \
+    git clone https://github.com/akalend/amqpcpp; \
+    cd amqpcpp; \
+    make; \
+    make install; \
+    cp -P /usr/local/lib/x86_64-linux-gnu/librabbitmq.* /usr/local/lib/; \
+    cp amqpcpp/libamqpcpp.a /usr/local/lib/libamqpcpp.a; \
+    cp amqpcpp/libamqpcpp.so /usr/local/lib/libamqpcpp.so; \
+    wget -O libzdb-3.1.tar.gz http://www.tildeslash.com/libzdb/dist/libzdb-3.1.tar.gz; \
+    tar xvzf libzdb-3.1.tar.gz; \
+    cd libzdb-3.1; \
+    ./configure --without-postgresql --without-sqlite; \
+    make; \
+    make install; \
+    git clone https://github.com/alanxz/SimpleAmqpClient; \
+    cd SimpleAmqpClient; \
+    mkdir simpleamqpclient-build; \
+    cd simpleamqpclient-build; \
+    cmake ..; \
+    make; \
+    make install; \
+    ldconfig; \
+    mkdir ~/.ssh; \
+    ssh-keyscan -H -p 22  gitlag.com >> ~/.ssh/known_hosts; \
+    ssh-keyscan -H -p 22  bitbucket.org >> ~/.ssh/known_hosts; \
+    chmod 0600 /opt/keys/bitbucket.id_rsa; \
+    chmod +x /opt/script.sh; \
+    rm -rf /var/lib/apt/lists/*
 
 CMD /opt/script.sh
+
 HEALTHCHECK --interval=5s --timeout=3s CMD pgrep kea-dhcp4

+ 20 - 19
1.4.0/kea-oss/Dockerfile

@@ -1,30 +1,31 @@
 FROM ubuntu:16.04
 
-RUN apt-get update && apt-get install -yq git vim build-essential dhcping
-
-RUN apt-get update && apt-get install -yq dh-autoreconf automake
-RUN apt-get update && apt-get install -yq libssl-dev liblog4cplus-dev libboost-dev libmysqlclient-dev libboost-all-dev mysql-client wget python-pip supervisor cmake
-
-RUN pip install superfsmon
-
-RUN wget -O kea-1.4.0-P1.tar.gz https://www.isc.org/downloads/file/kea-1-4-0-p1/?version=tar-gz
-RUN tar -zxvf kea-1.4.0-P1.tar.gz
-RUN mv kea-1.4.0-P1 /opt/kea
-
-RUN cd /opt/kea && autoreconf --install && ./configure --with-dhcp-mysql --enable-shell && make && make install && ldconfig
-
-EXPOSE 67/udp
-EXPOSE 68/udp
-
 ENV KEA_MSG_COMPILER=/usr/local/bin/kea-msg-compiler
 ENV KEA_LIB=/opt/kea/src/lib
 ENV KEA_INCLUDE=/opt/kea/src/lib
 
-RUN pip install watchdog
-RUN apt-get update && apt-get install -yq inotify-tools
+EXPOSE 67/udp 68/udp
 
 COPY script.sh /opt/script.sh
-RUN chmod +x /opt/script.sh
+
+RUN apt-get update; \ 
+    apt-get install -yq git vim build-essential dhcping dh-autoreconf automake \ 
+                        libssl-dev liblog4cplus-dev libboost-dev libmysqlclient-dev \
+                        libboost-all-dev mysql-client wget python-pip supervisor cmake
+                        inotify-tools cmake; \
+    pip install superfsmon watchdog; \
+    wget -O kea-1.4.0-P1.tar.gz https://www.isc.org/downloads/file/kea-1-4-0-p1/?version=tar-gz; \
+    tar -zxvf kea-1.4.0-P1.tar.gz; \
+    mv kea-1.4.0-P1 /opt/kea; \
+    cd /opt/kea; \
+    autoreconf --install; \
+    ./configure --with-dhcp-mysql --enable-shell; \
+    make; \
+    make install; \
+    ldconfig; \
+    chmod +x /opt/script.sh; \
+    rm -rf /var/lib/apt/lists/*
 
 CMD /opt/script.sh
+
 HEALTHCHECK --interval=5s --timeout=3s CMD pgrep kea-dhcp4

+ 8 - 3
1.4.0/kea-premium/Dockerfile

@@ -2,6 +2,11 @@ FROM docker.infra.flowdat.com/fd3/kea-oss-1.4.0:latest
 
 WORKDIR /opt/kea
 
-RUN wget -O kea-subscription-1.4.0.tar.gz https://ftp.isc.org/isc/kea/private/f62aefe6b659324b/kea-subscription-1.4.0.tar.gz && tar xvzf kea-subscription-1.4.0.tar.gz
-
-RUN autoreconf --install && ./configure --with-dhcp-mysql --enable-shell && make && make install && ldconfig
+RUN wget -O kea-subscription-1.4.0.tar.gz https://ftp.isc.org/isc/kea/private/f62aefe6b659324b/kea-subscription-1.4.0.tar.gz; \
+    tar xvzf kea-subscription-1.4.0.tar.gz; \
+    autoreconf --install; \
+    ./configure --with-dhcp-mysql --enable-shell; \
+    make; \
+    make install; \
+    ldconfig; \
+    rm -rf /var/lib/apt/lists/*