Dockerfile 920 B

123456789101112131415161718192021222324252627
  1. FROM ubuntu:16.04
  2. RUN apt-get update && apt-get install -yq git vim build-essential dhcping
  3. RUN apt-get update && apt-get install -yq dh-autoreconf automake
  4. 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
  5. RUN pip install superfsmon
  6. RUN wget -O kea-1.4.0-P1.tar.gz https://www.isc.org/downloads/file/kea-1-4-0-p1/?version=tar-gz
  7. RUN tar -zxvf kea-1.4.0-P1.tar.gz
  8. RUN mv kea-1.4.0-P1 /opt/kea
  9. RUN cd /opt/kea && autoreconf --install && ./configure --with-dhcp-mysql --enable-shell && make && make install && ldconfig
  10. EXPOSE 67/udp
  11. EXPOSE 68/udp
  12. ENV KEA_MSG_COMPILER=/usr/local/bin/kea-msg-compiler
  13. ENV KEA_LIB=/opt/kea/src/lib
  14. ENV KEA_INCLUDE=/opt/kea/src/lib
  15. COPY script.sh /opt/script.sh
  16. RUN chmod +x /opt/script.sh
  17. CMD /opt/script.sh
  18. HEALTHCHECK --interval=5s --timeout=3s CMD pgrep kea-dhcp4