123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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
- RUN wget https://www.isc.org/downloads/file/kea-1-3-0/?version=tar-gz
- RUN tar -zxvf kea-1.3.0.tar.gz
- RUN mv kea-1.3.0 /opt/kea
- RUN cd /opt/kea && autoreconf --install
- RUN cd /opt/kea && ./configure --with-dhcp-mysql --enable-shell
- RUN cd /opt/kea && 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
- 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 cd kea-cm-hook && make
- COPY script.sh /opt/script.sh
- RUN chmod +x /opt/script.sh
- CMD /opt/script.sh
|