diff --git a/docker/arch/Dockerfile b/docker/arch/Dockerfile index ed8d4d9..abef8e5 100644 --- a/docker/arch/Dockerfile +++ b/docker/arch/Dockerfile @@ -17,7 +17,7 @@ RUN pacman -Sy --noconfirm gcc clang valgrind \ unzip doxygen git cmake \ wget openssl python2 libxml2 \ curl lsb-release \ - rabbitmq libaio krb5 c-ares libgcrypt \ + rabbitmq libaio krb5 c-ares \ python2-pylint libcap lz4 numactl libunwind google-glog \ \ # next are for volumedriver-core diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile index 09e6295..3cbbb9f 100644 --- a/docker/centos/Dockerfile +++ b/docker/centos/Dockerfile @@ -19,7 +19,7 @@ RUN echo '%_install_langs C' >> /etc/rpm/macros && \ cppzmq-devel tokyocabinet-devel bzip2-devel protobuf-compiler \ gflags-devel snappy-devel omniORB-devel omniORB-servers python-omniORB \ redis hiredis-devel lz4-devel \ - python-nose libcurl-devel libgcrypt-devel libgcrypt \ + python-nose libcurl-devel \ rpm rpm-build fuse protobuf-python fakeroot libxio-devel \ uriparser-devel supervisor rpcbind libunwind glog-devel && \ yum clean all && \ diff --git a/docker/fc22/Dockerfile b/docker/fc22/Dockerfile index 1a029f9..fbb47fd 100644 --- a/docker/fc22/Dockerfile +++ b/docker/fc22/Dockerfile @@ -16,7 +16,7 @@ RUN echo '%_install_langs C' >> /etc/rpm/macros && \ librdmacm-devel loki-lib-devel protobuf-devel lttng-ust-devel \ cppzmq-devel tokyocabinet-devel bzip2-devel protobuf-compiler \ gflags-devel snappy-devel omniORB-devel omniORB-servers python-omniORB \ - redis hiredis-devel libgcrypt-devel libgcrypt \ + redis hiredis-devel \ python-nose libcurl-devel lz4-devel \ rpm rpm-build fuse protobuf-python fakeroot debhelper \ supervisor rpcbind && \ diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu1404/Dockerfile similarity index 94% rename from docker/ubuntu/Dockerfile rename to docker/ubuntu1404/Dockerfile index 2b144ab..104604f 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu1404/Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update && \ apt-get update && \ apt-get install -y gcc-4.9 g++-4.9 libstdc++-4.9-dev clang-3.5 \ libboost1.57-all-dev \ - build-essential libgcrypt11-dev libgcrypt11 \ + build-essential \ flex bison gawk check pkg-config \ autoconf libtool realpath bc gettext lcov \ unzip doxygen dkms debhelper pylint git cmake \ @@ -86,6 +86,12 @@ RUN usermod -a -G fuse jenkins && \ usermod -a -G sudo jenkins && \ usermod -a -G adm jenkins +# Redis cannot start as a daemon on a Docker build. +RUN sed -i "s/daemonize yes/daemonize no/g" /etc/redis/redis.conf + +# To preserve the logs for redis +RUN chown -R redis:redis /var/log/redis/ + ADD supervisord.conf /etc/supervisor/supervisord.conf ADD docker-entrypoint.sh /sbin/docker-entrypoint.sh diff --git a/docker/ubuntu/docker-entrypoint.sh b/docker/ubuntu1404/docker-entrypoint.sh similarity index 100% rename from docker/ubuntu/docker-entrypoint.sh rename to docker/ubuntu1404/docker-entrypoint.sh diff --git a/docker/ubuntu/supervisord.conf b/docker/ubuntu1404/supervisord.conf similarity index 81% rename from docker/ubuntu/supervisord.conf rename to docker/ubuntu1404/supervisord.conf index 9a031b2..1f3e23d 100644 --- a/docker/ubuntu/supervisord.conf +++ b/docker/ubuntu1404/supervisord.conf @@ -3,9 +3,15 @@ nodaemon=true [program:rpcbind] command=/sbin/rpcbind -f +startsecs=5 +exitcodes=0 [program:redis] command=bash -c "/usr/bin/redis-server /etc/redis/redis.conf" +startsecs=5 +exitcodes=0 [program:omniNames] command=bash -c "/usr/bin/omniNames -start -errlog /var/log/omniorb-nameserver.log || /usr/bin/omniNames -errlog /var/log/omniorb-nameserver.log" +startsecs=5 +exitcodes=0 diff --git a/docker/ubuntu1604/Dockerfile b/docker/ubuntu1604/Dockerfile index 7daa93d..aee1ffe 100644 --- a/docker/ubuntu1604/Dockerfile +++ b/docker/ubuntu1604/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update -qq && \ apt-get dist-upgrade -y && \ apt-get install -y gcc g++ clang-3.8 valgrind \ libboost1.58-all-dev \ - build-essential sudo libgcrypt20-dev libgcrypt20 \ + build-essential sudo \ flex bison gawk check pkg-config \ autoconf libtool realpath bc gettext lcov \ unzip doxygen dkms debhelper pylint git cmake \ @@ -43,6 +43,9 @@ RUN groupadd -g 1002 jenkins && \ useradd jenkins -s /bin/bash -g jenkins -m -u ${UID} -g 1002 -d /home/jenkins && \ echo "jenkins ALL=NOPASSWD: ALL" >/etc/sudoers.d/jenkins +#Creating TMP Directoy To Avoid permission Issues -- Bug in Xenial +RUN mkdir /opt/tmp_docker; chmod -R 777 /opt/tmp_docker + # volumedriver-core tests use arakoon & alba # (note: apt-get install -y --allow-unauthenticated arakoon alba does not yet work on 16.04) # volumedriver-core needs accelio library to build @@ -52,8 +55,9 @@ RUN echo "deb http://apt.openvstorage.com unstable main" > /etc/apt/sources.list libxio0 libxio0-dbg libxio0-dbgsym \ libxio-dev libxio-dev-dbgsym && \ apt-get install -y libev4 && \ - cd /root && apt-get download --allow-unauthenticated arakoon && \ + cd /opt/tmp_docker && apt-get download --allow-unauthenticated arakoon && \ dpkg -i --ignore-depends=libgflags2,libsnappy1 arakoon_*_amd64.deb && \ + #chown _apt arakoon_*_amd64.deb && \ rm arakoon_*_amd64.deb && \ apt-get clean @@ -71,6 +75,15 @@ RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100 && update-alternatives --install /usr/bin/scan-build scan-build /usr/bin/scan-build-3.8 100 && \ update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-3.8 100 +# Redis cannot start as a daemon on a Docker build. +RUN sed -i "s/daemonize yes/daemonize no/g" /etc/redis/redis.conf + +# To preserve the logs for redis +RUN chown -R redis:redis /var/log/redis/ + +# Cleaning behind +RUN rm -fr /opt/tmp_docker + ADD supervisord.conf /etc/supervisor/supervisord.conf ADD docker-entrypoint.sh /sbin/docker-entrypoint.sh diff --git a/docker/ubuntu1604/docker-entrypoint.sh b/docker/ubuntu1604/docker-entrypoint.sh index 384d1d1..7ab1aef 100755 --- a/docker/ubuntu1604/docker-entrypoint.sh +++ b/docker/ubuntu1604/docker-entrypoint.sh @@ -17,10 +17,5 @@ then [ -d /home/jenkins/.ssh ] && chown ${UID} /home/jenkins/.ssh fi -# update alba & arakoon packages to latest/greatest - -##apt-get update -qq -##apt-get install -qq -y alba arakoon - # finally execute the command the user requested exec "$@" diff --git a/docker/ubuntu1604/supervisord.conf b/docker/ubuntu1604/supervisord.conf index 9a031b2..1f3e23d 100644 --- a/docker/ubuntu1604/supervisord.conf +++ b/docker/ubuntu1604/supervisord.conf @@ -3,9 +3,15 @@ nodaemon=true [program:rpcbind] command=/sbin/rpcbind -f +startsecs=5 +exitcodes=0 [program:redis] command=bash -c "/usr/bin/redis-server /etc/redis/redis.conf" +startsecs=5 +exitcodes=0 [program:omniNames] command=bash -c "/usr/bin/omniNames -start -errlog /var/log/omniorb-nameserver.log || /usr/bin/omniNames -errlog /var/log/omniorb-nameserver.log" +startsecs=5 +exitcodes=0