1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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
- 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
- # KEA HOOKS
- RUN cd /opt/kea && 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 cd /opt/kea && autoreconf --install
- RUN cd /opt/kea && ./configure --with-dhcp-mysql --enable-shell
- RUN cd /opt/kea && make && make install
- RUN cd /opt/kea && 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 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
- RUN eval $(ssh-agent) && ssh-add /opt/keys/bitbucket.id_rsa && git clone git@bitbucket.org:ikflowdat/kea-cm-hook.git
- RUN cd kea-cm-hook && make
- 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 ldconfig
- COPY hook/ hook/
- RUN cd hook/amqp && make
- 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 apt install -yq python-pip supervisor
- RUN pip install superfsmon
- COPY script.sh /opt/script.sh
- RUN chmod +x /opt/script.sh
- CMD /opt/script.sh
- HEALTHCHECK --interval=5s --timeout=3s CMD pgrep kea-dhcp4
|