Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  5. RUN wget https://www.isc.org/downloads/file/kea-1-4-0-p1/?version=tar-gz
  6. RUN tar -zxvf kea-1.4.0-P1.tar.gz
  7. RUN mv kea-1.4.0-P1 /opt/kea
  8. RUN cd /opt/kea && autoreconf --install
  9. RUN cd /opt/kea && ./configure --with-dhcp-mysql --enable-shell
  10. RUN cd /opt/kea && make install
  11. RUN cd /opt/kea && ldconfig
  12. EXPOSE 67/udp
  13. EXPOSE 68/udp
  14. ENV KEA_MSG_COMPILER=/usr/local/bin/kea-msg-compiler
  15. ENV KEA_LIB=/opt/kea/src/lib
  16. ENV KEA_INCLUDE=/opt/kea/src/lib
  17. RUN mkdir ~/.ssh
  18. RUN ssh-keyscan -H -p 22 bitbucket.org >> ~/.ssh/known_hosts
  19. COPY keys/ /opt/keys
  20. RUN chmod 0600 /opt/keys/bitbucket.id_rsa
  21. RUN eval $(ssh-agent) && ssh-add /opt/keys/bitbucket.id_rsa && git clone git@bitbucket.org:ikflowdat/kea-cm-hook.git
  22. EXPOSE 67/udp
  23. EXPOSE 68/udp
  24. ENV KEA_MSG_COMPILER=/usr/local/bin/kea-msg-compiler
  25. ENV KEA_LIB=/opt/kea/src/lib
  26. ENV KEA_INCLUDE=/opt/kea/src/lib
  27. RUN cd kea-cm-hook && make
  28. COPY script.sh /opt/script.sh
  29. RUN chmod +x /opt/script.sh
  30. CMD /opt/script.sh