diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile deleted file mode 100644 index 6b8aa329c..000000000 --- a/dev/docker/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM debian:jessie -RUN apt-get update -RUN apt-get install -y clang cmake make ccache flex bison libboost-all-dev libssl-dev git-core cgdb subversion -RUN cd /root && mkdir gdb_printers && cd gdb_printers && svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python -RUN cd /root && git clone https://github.com/ruediger/Boost-Pretty-Printer -RUN mkdir /root/build -ADD build /root/build -ENV HOME /root diff --git a/dev/docker/build b/dev/docker/build index 1e19389a9..fcecb8577 100755 --- a/dev/docker/build +++ b/dev/docker/build @@ -1,16 +1,21 @@ #!/bin/sh -cd $(dirname -- $0) || exit 1 +if [ ! -e /.dockerenv ]; then + echo "This script should only be run in the Docker VM environment." + exit 1 +fi -cp icinga2/tools/debug/gdb/gdbinit /root/.gdbinit -sed -i 's/home\/gbeutner/root/' /root/.gdbinit +cd + +cp icinga2/tools/debug/gdb/gdbinit ~/.gdbinit +sed -i 's/home\/gbeutner/home\/icinga/' ~/.gdbinit cd icinga2-build || exit 1 CCACHE_SLOPPINESS="include_file_mtime" export CCACHE_SLOPPINESS -if [ ! -e CMakeCache.txt ]; then - CC="ccache clang" CXX="ccache clang++" cmake ../icinga2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/icinga2 -DCMAKE_INSTALL_SYSCONFDIR=/root/icinga2-config +if [ ! -e Makefile ]; then + CC="ccache clang" CXX="ccache clang++" cmake ../icinga2 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/icinga2-install -DCMAKE_INSTALL_SYSCONFDIR=~/icinga2-config fi -make -j 4 && make install && cgdb -ex set scheduler-locking step -ex r --args /opt/icinga2/sbin/icinga2 -c /root/icinga2-config/icinga2/icinga2.conf -DUseVfork=0 +make -j 4 && make install && cgdb -ex set scheduler-locking step -ex r --args ~/icinga2-install/sbin/icinga2 -c ~/icinga2-config/icinga2/icinga2.conf -DUseVfork=0 diff --git a/dev/run b/dev/run index b14dcf312..9e404ddf0 100755 --- a/dev/run +++ b/dev/run @@ -3,12 +3,31 @@ cd `dirname -- $0` DIR=`pwd` cd docker + +cat > Dockerfile <